3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $brokenJson = '[{"test":"}]'; $res = json_decode($brokenJson, true); if (json_last_error() != JSON_ERROR_NONE) { die(json_last_error_msg() . ' - ' . json_last_error()); } var_dump($res);
based on ttU4E
Output for 7.0.0 - 7.2.0
Control character error, possibly incorrectly encoded - 3
Output for 5.5.24 - 5.6.28
Syntax error - 4
Output for 5.3.19 - 5.4.45
Fatal error: Call to undefined function json_last_error_msg() in /in/P0S3i on line 8
Process exited with code 255.