Created
November 1, 2013 00:35
-
-
Save vinothbabu/7259456 to your computer and use it in GitHub Desktop.
circular references
This file contains hidden or 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 Vinoth { | |
public $f; | |
} | |
class Kevin { | |
public $f; | |
} | |
while(1){ | |
$a = new Vinoth; | |
$b = new Kevin; | |
$a->f = $b; | |
$b->f = $a; | |
echo "Memory usage" .number_format(memory_get_usage(true)) . " bytes\n"; | |
unset($a); | |
unset($b); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment