3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private $bar; private $baz; public function __construct($bar, $baz) { $this->bar = $bar; $this->baz = $baz; } } $foo = new Foo('hello','word'); $json = json_encode($foo); echo $json; $serialize = serialize($foo); echo $serialize; var_dump( json_decode($json) ); var_dump( deserialize($serialize) );
Output for git.master, git.master_jit, rfc.property-hooks
{}O:3:"Foo":2:{s:8:"Foobar";s:5:"hello";s:8:"Foobaz";s:4:"word";}object(stdClass)#2 (0) { } Fatal error: Uncaught Error: Call to undefined function deserialize() in /in/2JcFT:24 Stack trace: #0 {main} thrown in /in/2JcFT 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:
32.99 ms | 401 KiB | 8 Q