3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C { public $a = true; public function __sleep() { return array('a', 1); } } $a = new C; $s = serialize($a); var_dump($s); var_dump(unserialize($s));
Output for git.master, git.master_jit, rfc.property-hooks
Warning: serialize(): C::__sleep() should return an array only containing the names of instance-variables to serialize in /in/81nem on line 13 Warning: serialize(): "1" returned as member variable from __sleep() but does not exist in /in/81nem on line 13 string(24) "O:1:"C":1:{s:1:"a";b:1;}" object(C)#2 (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:
57.43 ms | 402 KiB | 8 Q