3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $_a = 10; public $b = 20; } $a = new Test; var_dump($a); $serialize = serialize($a); var_dump($serialize); $json = json_encode($serialize); var_dump($json); $jsonDecode = json_decode($json); $unserialize = unserialize($jsonDecode); var_dump($unserialize);
Output for git.master, git.master_jit, rfc.property-hooks
object(Test)#1 (2) { ["_a":"Test":private]=> int(10) ["b"]=> int(20) } string(48) "O:4:"Test":2:{s:8:"Test_a";i:10;s:1:"b";i:20;}" string(66) ""O:4:\"Test\":2:{s:8:\"\u0000Test\u0000_a\";i:10;s:1:\"b\";i:20;}"" object(Test)#2 (2) { ["_a":"Test":private]=> int(10) ["b"]=> int(20) }

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:
34.07 ms | 402 KiB | 8 Q