3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = new stdClass(); $y = new StdClass(); $x-> a = 10; $y->x = $x; $j = json_encode($y); $j2 = json_decode($j); var_dump($j2); var_dump((array) $j2); $j3 = json_decode($j, true); var_dump($j3);
Output for git.master, git.master_jit, rfc.property-hooks
object(stdClass)#4 (1) { ["x"]=> object(stdClass)#3 (1) { ["a"]=> int(10) } } array(1) { ["x"]=> object(stdClass)#3 (1) { ["a"]=> int(10) } } array(1) { ["x"]=> array(1) { ["a"]=> int(10) } }

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:
36.35 ms | 406 KiB | 5 Q