3v4l.org

run code in 200+ PHP versions simultaneously
<?php $checkme = ''; json_decode($checkme); if (json_last_error() === JSON_ERROR_NONE){ echo "No error."; }else{ echo "error detected of : " . json_last_error() . " " . json_last_error_msg(); }
based on drAq4
Output for 7.1.0 - 7.4.0
error detected of : 4 Syntax error