php man page for weakmap

Query: weakmap

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

WEAKMAP(3)								 1								WEAKMAP(3)

The WeakMap class

INTRODUCTION
CLASS SYNOPSIS
WeakMap WeakMapCountableArrayAccessIterator Methods o public WeakMap::__construct (void ) o public int WeakMap::count (void ) o public mixed WeakMap::current (void ) o public object WeakMap::key (void ) o public void WeakMap::next (void ) o public bool WeakMap::offsetExists (object $object) o public mixed WeakMap::offsetGet (object $object) o public void WeakMap::offsetSet (object $object, mixed $value) o public void WeakMap::offsetUnset (object $object) o public void WeakMap::rewind (void ) o public bool WeakMap::valid (void )
EXAMPLES
Example #1 Weakmap usage example <?php $wm = new WeakMap(); $o = new StdClass; class A { public function __destruct() { echo "Dead! "; } } $wm[$o] = new A; var_dump(count($wm)); echo "Unsetting.. "; unset($o); echo "Done "; var_dump(count($wm)); The above example will output: int(1) Unsetting.. Dead! Done int(0) PHP Documentation Group WEAKMAP(3)
Related Man Pages
splfixedarray(3) - php
yaf_config_simple(3) - php
directoryiterator(3) - php
recursivearrayiterator(3) - php
reflectionfunction(3) - php
Similar Topics in the Unix Linux Community
Please Welcome Don Cragun as Lead Moderator
Status of UNIX.COM Forum Transformation
Please Welcome Ravinder Singh to the Moderation Team
The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Don Cragun
Please Welcome Nicki Paul to the Moderator Team!