3v4l.org

run code in 300+ PHP versions simultaneously
<?php $Object = (object)array( 'a' => 1, 'b' => &$Object, ); print_r($Object); $Array = array( 'a' => 1, 'b' => &$Array, ); print_r($Array); $Array = unserialize(serialize($Array)); $Object = unserialize(serialize($Object)); $Object->b->a = 2; print_r($Object); $Array['b']['a'] = 2; print_r($Array);
Output for git.master, git.master_jit, rfc.property-hooks
stdClass Object ( [a] => 1 [b] => stdClass Object *RECURSION* ) Array ( [a] => 1 [b] => Array *RECURSION* ) stdClass Object ( [a] => 2 [b] => stdClass Object *RECURSION* ) Array ( [a] => 1 [b] => Array ( [a] => 2 [b] => Array *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:
51.92 ms | 401 KiB | 8 Q