Is there any way to check that a variable is a valid JSON string in PHP without using json_last_error()? I don\'t have PHP 5.3.3.
json_last_error()
You could check if the value from json_decode is null. If so, it's invalid.
json_decode
null