From ee84c87ea7237824e210161cacfb310e76c13a8a Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Tue, 31 Mar 2026 09:43:36 +0300 Subject: [PATCH 1/6] json-last-error.xml Move `Available as of` to *Availability* column to consistency --- reference/json/functions/json-last-error.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/json/functions/json-last-error.xml b/reference/json/functions/json-last-error.xml index ead9a9fb2ae4..8d96bba2c451 100644 --- a/reference/json/functions/json-last-error.xml +++ b/reference/json/functions/json-last-error.xml @@ -102,8 +102,8 @@ JSON_ERROR_NON_BACKED_ENUM - Value contains a non-backed enum which cannot be serialized. Available as of PHP 8.1.0. - + Value contains a non-backed enum which cannot be serialized + Available as of PHP 8.1.0 From b0d8847507acb79952d2acf94f3d9a3accfb70b7 Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Sun, 26 Apr 2026 15:37:57 +0300 Subject: [PATCH 2/6] Update reference/json/functions/json-last-error.xml Co-authored-by: Louis-Arnaud --- reference/json/functions/json-last-error.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/json/functions/json-last-error.xml b/reference/json/functions/json-last-error.xml index 8d96bba2c451..5d14b0438380 100644 --- a/reference/json/functions/json-last-error.xml +++ b/reference/json/functions/json-last-error.xml @@ -31,7 +31,7 @@ JSON error codes - + Constant From 6e7f6e61ad49565c254e6d2b9211a17495440f56 Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Thu, 23 Jul 2026 10:07:18 +0300 Subject: [PATCH 3/6] Apply suggestions from code review Co-authored-by: Louis-Arnaud --- reference/json/functions/json-last-error.xml | 25 ++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/reference/json/functions/json-last-error.xml b/reference/json/functions/json-last-error.xml index 5d14b0438380..c01869037e66 100644 --- a/reference/json/functions/json-last-error.xml +++ b/reference/json/functions/json-last-error.xml @@ -31,7 +31,7 @@
JSON error codes - + Constant @@ -103,13 +103,34 @@ JSON_ERROR_NON_BACKED_ENUM Value contains a non-backed enum which cannot be serialized - Available as of PHP 8.1.0
+ + &reftitle.changelog; + + + + + &Version; + &Description; + + + + + 8.1.0 + + JSON_ERROR_NON_BACKED_ENUM was added. + + + + + + + &reftitle.examples; From 7250fedc0858a4133cb966d58345abc0aa467a27 Mon Sep 17 00:00:00 2001 From: lacatoire Date: Thu, 27 Aug 2026 10:15:56 +0200 Subject: [PATCH 4/6] Convert JSON error codes table to variablelist --- reference/json/functions/json-last-error.xml | 161 ++++++++++--------- 1 file changed, 81 insertions(+), 80 deletions(-) diff --git a/reference/json/functions/json-last-error.xml b/reference/json/functions/json-last-error.xml index c01869037e66..dcd558941d60 100644 --- a/reference/json/functions/json-last-error.xml +++ b/reference/json/functions/json-last-error.xml @@ -26,87 +26,88 @@ &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 codes - - - - Constant - Meaning - Availability - - - - - 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_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 + + +
From 593ab99f24025cdac78b2df7534ecb9e784fead6 Mon Sep 17 00:00:00 2001 From: lacatoire Date: Thu, 27 Aug 2026 10:18:02 +0200 Subject: [PATCH 5/6] Wrap variablelist in para --- reference/json/functions/json-last-error.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reference/json/functions/json-last-error.xml b/reference/json/functions/json-last-error.xml index dcd558941d60..64437f0523aa 100644 --- a/reference/json/functions/json-last-error.xml +++ b/reference/json/functions/json-last-error.xml @@ -29,7 +29,8 @@ Returns an integer, the value can be one of the following constants:
- + + JSON_ERROR_NONE @@ -107,7 +108,8 @@ Value contains a non-backed enum which cannot be serialized - + +
From ffaac2184902120baeaeea78b9ea16bb189ab747 Mon Sep 17 00:00:00 2001 From: lacatoire Date: Thu, 27 Aug 2026 10:19:36 +0200 Subject: [PATCH 6/6] Fix para -> simpara --- reference/json/functions/json-last-error.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/json/functions/json-last-error.xml b/reference/json/functions/json-last-error.xml index 64437f0523aa..d5d012fdf3f6 100644 --- a/reference/json/functions/json-last-error.xml +++ b/reference/json/functions/json-last-error.xml @@ -25,10 +25,10 @@ &reftitle.returnvalues; - + Returns an integer, the value can be one of the following constants: - +