3v4l.org

run code in 300+ PHP versions simultaneously
<?php json_decode(''); var_dump(json_last_error()); var_dump(json_last_error_msg());
based on aHWjF
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.26, 7.4.0 - 7.4.14, 8.0.0
int(4) string(12) "Syntax error"
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
int(0) string(8) "No error"