when json_decode a empty string, PHP7 will trigger an Syntax error:
<?php
json_decode("");
var_dump(json_last_error(), json_last_error_msg());
// PHP 7
int(4)
string(12) "Syntax error"
// PHP 5
int(0)
string(8) "No error"
when json_decode a empty string, PHP7 will trigger an Syntax error:
<?php
json_decode("");
var_dump(json_last_error(), json_last_error_msg());
// PHP 7
int(4)
string(12) "Syntax error"
// PHP 5
int(0)
string(8) "No error"