3v4l.org

run code in 500+ PHP versions simultaneously
<?php // JSON is decoded print_r(json_decode('{"a":1,"b":3,"a":2}')); // with an error print json_last_error_msg(); // it is actually an error print_r(json_decode('{"a":1,"b":3,a":2}', flags: JSON_THROW_ON_ERROR)); ?>
Output for git.master, git.master_jit
stdClass Object ( [a] => 2 [b] => 3 ) No error Fatal error: Uncaught JsonException: Syntax error near location 1:14 in /in/rECYJ:10 Stack trace: #0 /in/rECYJ(10): json_decode('{"a":1,"b":3,a"...', NULL, 512, 4194304) #1 {main} thrown in /in/rECYJ on line 10
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:
40.57 ms | 800 KiB | 4 Q