Skip to content

Instantly share code, notes, and snippets.

Created April 8, 2013 15:25
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/5337645 to your computer and use it in GitHub Desktop.
Save anonymous/5337645 to your computer and use it in GitHub Desktop.
<?php
class FOO {
public $f;
}
class BAR {
public $f;
}
while(1) {
$a = new FOO();
$b = new BAR();
$a->f = $b;
$b->f = $a;
print "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