array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.json-last-error-msg.php', 1 => 'json_last_error_msg', ), 'up' => array ( 0 => 'ref.json.php', 1 => 'JSON 函数', ), 'prev' => array ( 0 => 'function.json-encode.php', 1 => 'json_encode', ), 'next' => array ( 0 => 'function.json-last-error.php', 1 => 'json_last_error', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'zh', 'path' => 'reference/json/functions/json-last-error-msg.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.5.0, PHP 7, PHP 8)
json_last_error_msg — 返回最后一次调用 json_encode() 或 json_decode() 时产生的错误信息
当没有设置 JSON_THROW_ON_ERROR
参数时,返回最后一次调用 json_encode() 或 json_decode()
产生的错误信息。
此函数没有参数。
成功则返回错误信息,如果没有错误产生则返回 "No error"
。