3v4l.org

run code in 300+ PHP versions simultaneously
<?php // TYPE 1 - valid in top level but not valid in array // parsed at the top level var_dump(json_decode("07")); var_dump(json_decode("0xff")); var_dump(json_decode(".1")); var_dump(json_decode("-.1")); // parser by JSON_Parser var_dump(json_decode("[07]")); var_dump(json_decode("[0xff]")); var_dump(json_decode("[.1]")); var_dump(json_decode("[-.1]")); var_dump(json_last_error_msg()); // TYPE 2 - valid in top level as well as valid in array // parsed at the top level var_dump(json_decode("1.")); var_dump(json_decode("1.e1")); // parser by JSON_Parser var_dump(json_decode("[1.]")); var_dump(json_decode("[1.e1]"));
Output for git.master, git.master_jit, rfc.property-hooks
NULL NULL NULL NULL NULL NULL NULL NULL string(12) "Syntax error" NULL NULL NULL NULL

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.33 ms | 401 KiB | 8 Q