3v4l.org

run code in 300+ PHP versions simultaneously
<?php $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
Warning: Undefined variable $someJSON in /in/3037d on line 4 Deprecated: json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in /in/3037d on line 4 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/3037d:12 Stack trace: #0 /in/3037d(12): unserialize(Object(stdClass)) #1 {main} thrown in /in/3037d on line 12
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:
49.31 ms | 402 KiB | 8 Q