diff --git a/reference/json/functions/json-last-error.xml b/reference/json/functions/json-last-error.xml index ead9a9fb2ae4..d5d012fdf3f6 100644 --- a/reference/json/functions/json-last-error.xml +++ b/reference/json/functions/json-last-error.xml @@ -25,89 +25,113 @@ &reftitle.returnvalues; + + Returns an integer, the value can be one of the following + constants: + - Returns an integer, the value can be one of the following - constants: + + + JSON_ERROR_NONE + + No error has occurred + + + + JSON_ERROR_DEPTH + + The maximum stack depth has been exceeded + + + + JSON_ERROR_STATE_MISMATCH + + Invalid or malformed JSON + + + + JSON_ERROR_CTRL_CHAR + + Control character error, possibly incorrectly encoded + + + + JSON_ERROR_SYNTAX + + Syntax error + + + + JSON_ERROR_UTF8 + + Malformed UTF-8 characters, possibly incorrectly encoded + + + + JSON_ERROR_RECURSION + + One or more recursive references in the value to be encoded + + + + JSON_ERROR_INF_OR_NAN + + + One or more + NAN + or INF + values in the value to be encoded + + + + + JSON_ERROR_UNSUPPORTED_TYPE + + A value of a type that cannot be encoded was given + + + + JSON_ERROR_INVALID_PROPERTY_NAME + + A property name that cannot be encoded was given + + + + JSON_ERROR_UTF16 + + Malformed UTF-16 characters, possibly incorrectly encoded + + + + JSON_ERROR_NON_BACKED_ENUM + + Value contains a non-backed enum which cannot be serialized + + + - - JSON error codes + + + + &reftitle.changelog; + - Constant - Meaning - Availability + &Version; + &Description; - JSON_ERROR_NONE - No error has occurred - - - - JSON_ERROR_DEPTH - The maximum stack depth has been exceeded - - - - JSON_ERROR_STATE_MISMATCH - Invalid or malformed JSON - - - - JSON_ERROR_CTRL_CHAR - Control character error, possibly incorrectly encoded - - - - JSON_ERROR_SYNTAX - Syntax error - - - - JSON_ERROR_UTF8 - Malformed UTF-8 characters, possibly incorrectly encoded - - - - JSON_ERROR_RECURSION - One or more recursive references in the value to be encoded - - - - JSON_ERROR_INF_OR_NAN + 8.1.0 - One or more - NAN - or INF - values in the value to be encoded + JSON_ERROR_NON_BACKED_ENUM was added. - - - - JSON_ERROR_UNSUPPORTED_TYPE - A value of a type that cannot be encoded was given - - - - JSON_ERROR_INVALID_PROPERTY_NAME - A property name that cannot be encoded was given - - - - JSON_ERROR_UTF16 - Malformed UTF-16 characters, possibly incorrectly encoded - - - - JSON_ERROR_NON_BACKED_ENUM - Value contains a non-backed enum which cannot be serialized. Available as of PHP 8.1.0. - -
+