3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = [ 'test' => 1 ]; $b = serialize($a); var_dump(unserialize($b)); echo"<br />"; echo"<br />"; var_dump("---------------"); echo"<br />"; echo"<br />"; var_dump(unserialize($b, ['allowed_classes'=>['stdClass']])); echo"<br />"; echo"<br />"; var_dump("---------------"); var_dump(count(unserialize($b, ['allowed_classes'=>false]))); echo"<br />"; echo"<br />"; var_dump("---------------"); var_dump(unserialize($b, false)); echo"<br />"; echo"<br />"; var_dump("---------------"); var_dump(unserialize($b, ['allowed_classes'=>true])); echo"<br />"; echo"<br />"; var_dump("---------------"); var_dump(unserialize($b, [false]));
Output for git.master, git.master_jit
array(1) { ["test"]=> int(1) } <br /><br />string(15) "---------------" <br /><br />array(1) { ["test"]=> int(1) } <br /><br />string(15) "---------------" int(1) <br /><br />string(15) "---------------" Fatal error: Uncaught TypeError: unserialize(): Argument #2 ($options) must be of type array, bool given in /in/df1nW:24 Stack trace: #0 /in/df1nW(24): unserialize('a:1:{s:4:"test"...', false) #1 {main} thrown in /in/df1nW on line 24
Process exited with code 255.
Output for rfc.property-hooks
array(1) { ["test"]=> int(1) } <br /><br />string(15) "---------------" <br /><br />array(1) { ["test"]=> int(1) } <br /><br />string(15) "---------------" int(1) <br /><br />string(15) "---------------" Fatal error: Uncaught TypeError: unserialize(): Argument #2 ($options) must be of type array, false given in /in/df1nW:24 Stack trace: #0 /in/df1nW(24): unserialize('a:1:{s:4:"test"...', false) #1 {main} thrown in /in/df1nW on line 24
Process exited with code 255.

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