3v4l.org

run code in 300+ PHP versions simultaneously
<?php // the name and value must be enclosed in double quotes // single quotes are not valid $bad_json = "{ 'bar': 'baz' }"; echo "BAD:"; json_decode($bad_json); // null $good_json = '{"foo-bar": 12345}'; echo "\nGOOD"; json_decode($good_json);

preferences:
36.48 ms | 402 KiB | 5 Q