3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(gc_enabled()); $objstore = new SplObjectStorage(); $a = new StdClass; $b = new StdClass; $a->b = $b; $objstore->attach($a); $objstore->attach($b); gc_collect_cycles(); var_dump($objstore); print serialize($objstore);
Output for git.master, git.master_jit, rfc.property-hooks
bool(true) object(SplObjectStorage)#1 (1) { ["storage":"SplObjectStorage":private]=> array(2) { [0]=> array(2) { ["obj"]=> object(stdClass)#2 (1) { ["b"]=> object(stdClass)#3 (0) { } } ["inf"]=> NULL } [1]=> array(2) { ["obj"]=> object(stdClass)#3 (0) { } ["inf"]=> NULL } } } O:16:"SplObjectStorage":2:{i:0;a:4:{i:0;O:8:"stdClass":1:{s:1:"b";O:8:"stdClass":0:{}}i:1;N;i:2;r:4;i:3;N;}i:1;a:0:{}}

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
40.55 ms | 402 KiB | 8 Q