3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(gc_enabled()); $objstore = new SplObjectStorage(); $a = new StdClass; $b = new StdClass; $c = new StdClass; $a->b = $b; $b->a = $a; $c->b = $b $b->c = $c; $objstore->attach($a); $objstore->attach($b); $objstore->attach($c); gc_collect_cycles(); var_dump($objstore); print serialize($objstore);
Output for 5.4.0 - 5.4.22
Parse error: syntax error, unexpected '$b' (T_VARIABLE) in /in/rLHKP on line 11
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_VARIABLE in /in/rLHKP on line 11
Process exited with code 255.