json_last_error()
在PHP7中返回不同的值。
$input = file_get_contents('php://input');
$json = json_decode($input, true);
print_r(json_last_error());
curl 'http://localhost/test.php' -H 'Content-Type: application/json' --compressed
php5返回0(JSON\u ERROR\u NONE)
我看了官方文件,如果有变化,但我找不到任何信息。
json_decode()
或
json\u last\u error()
功能?