diff --git a/reference/json/constants.xml b/reference/json/constants.xml index acb2864e90..a768e6a71c 100644 --- a/reference/json/constants.xml +++ b/reference/json/constants.xml @@ -1,9 +1,60 @@ - + &reftitle.constants; - &no.constants; + &extension.constants; + + The following constants indicates an error type returned + by json_last_error and are all available + as of PHP 5.3.0. + + + + + JSON_ERROR_NONE + (integer) + + + + No error have occured. + + + + + + JSON_ERROR_DEPTH + (integer) + + + + The maximum stack depth have been exceeded. + + + + + + JSON_ERROR_CTRL_CHAR + (integer) + + + + Control character error, possibly wrongly encoded. + + + + + + JSON_ERROR_SYNTAX + (integer) + + + + Syntax error. + + + + + + + json_last_error + Returns the last error occured + + + + &reftitle.description; + + intjson_last_error + + + + Returns the last error (if any) occured by last JSON parsing. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + Returns an integer, the value can be one of the following: + + + JSON error codes + + + + Constant + Meaning + + + + + JSON_ERROR_NONE + No error have occured + + + JSON_ERROR_DEPTH + The maximum stack depth have been exceeded + + + JSON_ERROR_CTRL_CHAR + Control character error, possibly wrongly encoded + + + JSON_ERROR_SYNTAX + Syntax error + + + +
+
+ + + &reftitle.examples; + + + A <function>json_encode</function> example + + +]]> + + &example.outputs; + + + + + + + + + &reftitle.seealso; + + + json_decode + + + +
+ + diff --git a/reference/json/versions.xml b/reference/json/versions.xml index d7cb460f48..e081565d0d 100644 --- a/reference/json/versions.xml +++ b/reference/json/versions.xml @@ -1,11 +1,12 @@ - + +