From 3c8f21c532d517ce8ff8d1883e64315fb92f27f4 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Fri, 12 Jan 2024 16:46:52 +0300 Subject: [PATCH 1/3] [PHP 8.3] Update functions --- reference/array/functions/array-product.xml | 26 ++++++++++++++++ reference/array/functions/array-sum.xml | 26 ++++++++++++++++ reference/misc/functions/highlight-file.xml | 24 +++++++++++++++ reference/misc/functions/highlight-string.xml | 30 +++++++++++++++++++ reference/strings/functions/strtok.xml | 24 +++++++++++++++ reference/var/functions/unserialize.xml | 9 +++++- 6 files changed, 138 insertions(+), 1 deletion(-) diff --git a/reference/array/functions/array-product.xml b/reference/array/functions/array-product.xml index e017117e4cdd..03922c374713 100644 --- a/reference/array/functions/array-product.xml +++ b/reference/array/functions/array-product.xml @@ -38,6 +38,32 @@ xmlns:xlink="http://www.w3.org/1999/xlink"> Returns the product as an integer or float. + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 8.3.0 + + Now emits E_WARNING when array values + cannot be converted to &integer; or &float;. + + + + + + + + &reftitle.examples; diff --git a/reference/array/functions/array-sum.xml b/reference/array/functions/array-sum.xml index 7c0b0683cd89..0cb998727c5b 100644 --- a/reference/array/functions/array-sum.xml +++ b/reference/array/functions/array-sum.xml @@ -37,6 +37,32 @@ array is empty. + + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 8.3.0 + + Now emits E_WARNING when array values + cannot be converted to &integer; or &float;. + + + + + + + + &reftitle.examples; diff --git a/reference/misc/functions/highlight-file.xml b/reference/misc/functions/highlight-file.xml index 0cc1bbbaf49f..b077786252c6 100644 --- a/reference/misc/functions/highlight-file.xml +++ b/reference/misc/functions/highlight-file.xml @@ -66,6 +66,30 @@ AddType application/x-httpd-php-source .phps + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 8.3.0 + + The resulting HTML has changed. + + + + + + + + &reftitle.notes; diff --git a/reference/misc/functions/highlight-string.xml b/reference/misc/functions/highlight-string.xml index 3c1e4fe1078a..61801beeca9c 100644 --- a/reference/misc/functions/highlight-string.xml +++ b/reference/misc/functions/highlight-string.xml @@ -53,6 +53,30 @@ + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 8.3.0 + + The resulting HTML has changed. + + + + + + + + &reftitle.examples; @@ -72,6 +96,12 @@ highlight_string(''); <?php phpinfo(); ?> +]]> + + &example.outputs.83; + +<?php phpinfo(); ?> ]]> diff --git a/reference/strings/functions/strtok.xml b/reference/strings/functions/strtok.xml index 692dd60a5988..d6774a980227 100644 --- a/reference/strings/functions/strtok.xml +++ b/reference/strings/functions/strtok.xml @@ -85,6 +85,30 @@ + + &reftitle.changelog; + + + + + + &Version; + &Description; + + + + + 8.3.0 + + Now emits E_WARNING when token is not provided. + + + + + + + + &reftitle.examples; diff --git a/reference/var/functions/unserialize.xml b/reference/var/functions/unserialize.xml index 7a8df7fafcef..0c5d40135754 100644 --- a/reference/var/functions/unserialize.xml +++ b/reference/var/functions/unserialize.xml @@ -134,7 +134,7 @@ In case the passed string is not unserializeable, &false; is returned and - E_NOTICE is issued. + E_WARNING is issued. @@ -157,6 +157,13 @@ + + 8.3.0 + + Now emits E_WARNING when the passed string is not unserializeable; + previously E_NOTICE was issued. + + 7.4.0 From ead67f07b4b02929fb3a977dd12b7116dc61af67 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Mon, 15 Jan 2024 17:53:39 +0300 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Gina Peter Banyard --- reference/array/functions/array-product.xml | 2 ++ reference/array/functions/array-sum.xml | 2 ++ reference/var/functions/unserialize.xml | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/reference/array/functions/array-product.xml b/reference/array/functions/array-product.xml index 03922c374713..32b3b8e2ec8c 100644 --- a/reference/array/functions/array-product.xml +++ b/reference/array/functions/array-product.xml @@ -56,6 +56,8 @@ xmlns:xlink="http://www.w3.org/1999/xlink"> Now emits E_WARNING when array values cannot be converted to &integer; or &float;. + Previously &array;s and &object;s where ignored whilst every other value was cast to &integer;. + Moreover, objects that define a numeric cast (e.g. GMP) are now cast instead of ignored. diff --git a/reference/array/functions/array-sum.xml b/reference/array/functions/array-sum.xml index 0cb998727c5b..07d73a5ac498 100644 --- a/reference/array/functions/array-sum.xml +++ b/reference/array/functions/array-sum.xml @@ -55,6 +55,8 @@ Now emits E_WARNING when array values cannot be converted to &integer; or &float;. + Previously &array;s and &object;s where ignored whilst every other value was cast to &integer;. + Moreover, objects that define a numeric cast (e.g. GMP) are now cast instead of ignored. diff --git a/reference/var/functions/unserialize.xml b/reference/var/functions/unserialize.xml index 0c5d40135754..8d294f301c0e 100644 --- a/reference/var/functions/unserialize.xml +++ b/reference/var/functions/unserialize.xml @@ -161,7 +161,7 @@ 8.3.0 Now emits E_WARNING when the passed string is not unserializeable; - previously E_NOTICE was issued. + previously E_NOTICE was emitted. From 140e9cf19cb5291074600a5cb1a61b853ec26c86 Mon Sep 17 00:00:00 2001 From: Sergey Panteleev Date: Tue, 16 Jan 2024 16:35:02 +0300 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Gina Peter Banyard --- reference/array/functions/array-product.xml | 2 +- reference/array/functions/array-sum.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/array/functions/array-product.xml b/reference/array/functions/array-product.xml index 32b3b8e2ec8c..a38342bc3912 100644 --- a/reference/array/functions/array-product.xml +++ b/reference/array/functions/array-product.xml @@ -57,7 +57,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink"> Now emits E_WARNING when array values cannot be converted to &integer; or &float;. Previously &array;s and &object;s where ignored whilst every other value was cast to &integer;. - Moreover, objects that define a numeric cast (e.g. GMP) are now cast instead of ignored. + Moreover, objects that define a numeric cast (e.g. GMP) are now cast instead of ignored. diff --git a/reference/array/functions/array-sum.xml b/reference/array/functions/array-sum.xml index 07d73a5ac498..4e64bb9ba98b 100644 --- a/reference/array/functions/array-sum.xml +++ b/reference/array/functions/array-sum.xml @@ -56,7 +56,7 @@ Now emits E_WARNING when array values cannot be converted to &integer; or &float;. Previously &array;s and &object;s where ignored whilst every other value was cast to &integer;. - Moreover, objects that define a numeric cast (e.g. GMP) are now cast instead of ignored. + Moreover, objects that define a numeric cast (e.g. GMP) are now cast instead of ignored.