3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $parent; } $a = new Foo(); $a->parent = new stdClass(); $a->parent->x = [$a]; print_r($a); $arr = [ [$a], $a, ]; print_r($arr);
Output for git.master_jit, git.master
Foo Object ( [parent] => stdClass Object ( [x] => Array ( [0] => Foo Object *RECURSION* ) ) ) Array ( [0] => Array ( [0] => Foo Object ( [parent] => stdClass Object ( [x] => Array ( [0] => Foo Object *RECURSION* ) ) ) ) [1] => Foo Object ( [parent] => stdClass Object ( [x] => Array ( [0] => Foo Object *RECURSION* ) ) ) )

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:
62.54 ms | 407 KiB | 5 Q