note 113243 added to function.json-last-error-msg
| From: | Anonymous | Date: | Tue, 17 Sep 2013 10:39:27 +0000 |
| Subject: | note 113243 added to function.json-last-error-msg | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-196277@lists.php.net to get a copy of this message | ||
if (!function_exists('json_last_error_msg')) {
function json_last_error_msg() {
static $errors = array(
JSON_ERROR_NONE => null,
JSON_ERROR_DEPTH => 'Maximum stack depth exceeded',
JSON_ERROR_STATE_MISMATCH => 'Underflow or the modes mismatch',
JSON_ERROR_CTRL_CHAR => 'Unexpected control character found',
JSON_ERROR_SYNTAX => 'Syntax error, malformed JSON',
JSON_ERROR_UTF8 => 'Malformed UTF-8 characters, possibly incorrectly
encoded'
);
$error = json_last_error();
return array_key_exists($error, $errors) ? $errors[$error] : "Unknown error
({$error})";
}
}
----
Server IP: 69.147.83.199
Probable Submitter: 212.42.94.154
----
Manual Page -- http://php.net/manual/en/function.json-last-error-msg.php
Edit -- https://master.php.net/note/edit/113243
Del: integrated -- https://master.php.net/note/delete/113243/integrated
Del: useless -- https://master.php.net/note/delete/113243/useless
Del: bad code -- https://master.php.net/note/delete/113243/bad+code
Del: spam -- https://master.php.net/note/delete/113243/spam
Del: non-english -- https://master.php.net/note/delete/113243/non-english
Del: in docs -- https://master.php.net/note/delete/113243/in+docs
Del: other reasons-- https://master.php.net/note/delete/113243
Reject -- https://master.php.net/note/reject/113243
Search -- https://master.php.net/manage/user-notes.php