3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = (object)[ '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, rfc.property-hooks
object(stdClass)#2 (1) { ["test"]=> int(1) } <br /><br />string(15) "---------------" <br /><br />object(stdClass)#2 (1) { ["test"]=> int(1) } <br /><br />string(15) "---------------" Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, __PHP_Incomplete_Class given in /in/oId9j:20 Stack trace: #0 {main} thrown in /in/oId9j on line 20
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:
31.45 ms | 401 KiB | 8 Q