3v4l.org

run code in 500+ PHP versions simultaneously
<?php echo "'string'\n"; json_decode("'string'"); var_dump(json_last_error(), json_last_error_msg()); echo "100\n"; json_decode("100"); // int var_dump(json_last_error(), json_last_error_msg()); echo "1.\n"; json_decode("1."); // float var_dump(json_last_error(), json_last_error_msg()); echo "1.0\n"; json_decode("1.0"); // float var_dump(json_last_error(), json_last_error_msg()); echo ".5\n"; json_decode(".5"); // float var_dump(json_last_error(), json_last_error_msg()); echo "true\n"; json_decode("true"); // bool var_dump(json_last_error(), json_last_error_msg());
Output for rfc.property-hooks, git.master, git.master_jit
'string' int(4) string(12) "Syntax error" 100 int(0) string(8) "No error" 1. int(4) string(12) "Syntax error" 1.0 int(0) string(8) "No error" .5 int(4) string(12) "Syntax error" true int(0) string(8) "No error"

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:
94.86 ms | 2183 KiB | 4 Q