3v4l.org

run code in 300+ PHP versions simultaneously
<?php $someJson = '{"":""}'; var_dump($someJson); $myObject = json_decode($someJSON); $newJson = json_encode($myObject); var_dump($someJson, $newJson, $someJson === $newJson); $myObject = (object)[""=>""]; $serialized = serialize($myObject); var_dump($myObject, $serialized); $unserialized = unserialize($myObject); var_dump($unserialized);
Output for git.master, git.master_jit, rfc.property-hooks
string(7) "{"":""}" Warning: Undefined variable $someJSON in /in/N02ZD on line 5 Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in /in/N02ZD on line 5 string(7) "{"":""}" string(4) "null" bool(false) object(stdClass)#1 (1) { [""]=> string(0) "" } string(33) "O:8:"stdClass":1:{s:0:"";s:0:"";}" Fatal error: Uncaught TypeError: unserialize(): Argument #1 ($data) must be of type string, stdClass given in /in/N02ZD:13 Stack trace: #0 /in/N02ZD(13): unserialize(Object(stdClass)) #1 {main} thrown in /in/N02ZD on line 13
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:
50.03 ms | 402 KiB | 8 Q