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)); ?>

preferences:
46.44 ms | 804 KiB | 5 Q