3v4l.org

run code in 300+ PHP versions simultaneously
<?php class testString { public $a = true; function __sleep() { return array('a', '1'); } } class testInteger { public $a = true; function __sleep() { return array('a', 1); } } $cs = new testString(); $ci = new testInteger(); $ss = @serialize($cs); echo $ss . "\n"; $si = @serialize($ci); echo $si . "\n"; var_dump(unserialize($ss)); var_dump(unserialize($si));
Output for git.master, git.master_jit, rfc.property-hooks
O:10:"testString":1:{s:1:"a";b:1;} O:11:"testInteger":1:{s:1:"a";b:1;} object(testString)#3 (1) { ["a"]=> bool(true) } object(testInteger)#3 (1) { ["a"]=> bool(true) }

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:
50.74 ms | 401 KiB | 8 Q