3v4l.org

run code in 500+ PHP versions simultaneously
<?php class C { public int $a = 5; public string $b = "10"; } $o = new C(); var_dump(serialize($o)); $o2 = unserialize('O:1:"C":2:{s:1:"a";s:2:"10";s:1:"b";i:5;}'); var_dump($o2);
Output for git.master, git.master_jit
string(41) "O:1:"C":2:{s:1:"a";i:5;s:1:"b";s:2:"10";}" Fatal error: Uncaught TypeError: Cannot assign string to property C::$a of type int in /in/B71tR:11 Stack trace: #0 /in/B71tR(11): unserialize('O:1:"C":2:{s:1:...') #1 {main} thrown in /in/B71tR on line 11
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:
53.05 ms | 808 KiB | 4 Q