Created
January 2, 2015 11:02
-
-
Save sagikazarmark/06b856c94acfb3dbb6e9 to your computer and use it in GitHub Desktop.
Tests that the object storage dereferences objects stored
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class foo | |
{ | |
public function __destruct() | |
{ | |
echo 'Destructor called'; | |
} | |
} | |
$storage = new \SplObjectStorage; | |
$storage->attach($foo = new foo); | |
unset($foo); | |
echo "Unset called\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment