Commit 37447029677 for php.net

commit 374470296773c3280b5c2fcf25a860ff29819a87
Author: Tim Düsterhus <tim@tideways-gmbh.com>
Date:   Wed Jun 24 14:52:57 2026 +0200

    Copy-edit NEWS / UPGRADING

    This fixes some typos and inconsistencies (e.g. markdown backticks which are
    not used, since these are not markdown) and reflows the lines (some of them
    were too wide).

diff --git a/NEWS b/NEWS
index fede5aa5173..0961ddaa9fb 100644
--- a/NEWS
+++ b/NEWS
@@ -24,10 +24,10 @@ PHP                                                                        NEWS
   . Fixed bug GH-22046 (The unserialize function can lead to segfault when
     non-Serializable internal classes are serialized back with the C format).
     (kocsismate)
-  . Fixed bug GH-22292 (AST pretty printing does not correctly handle
-    invalid variable names). (timwolla)
-  . Fixed bug GH-22291 (AST pretty printing does not correctly handle braces
-    in string interpolation). (timwolla)
+  . Fixed bug GH-22292 (AST pretty printing does not correctly handle invalid
+    variable names). (timwolla)
+  . Fixed bug GH-22291 (AST pretty printing does not correctly handle braces in
+    string interpolation). (timwolla)
   . Fixed bug GH-22373 (AST pretty-printing drops meaningful parentheses
     surrounding property access). (timwolla)

@@ -44,17 +44,16 @@ PHP                                                                        NEWS
   . Update timelib to 2022.16. (Derick)

 - DOM:
-  . Removed LIBXML_XINCLUDE from valid options for XMLDocument,
-    as it was a no-op. (ndossche)
+  . Removed LIBXML_XINCLUDE from valid options for XMLDocument, as it was a
+    no-op. (ndossche)
   . Readonly DOM properties are now declared with asymmetric visibility
     (public private(set)). ReflectionProperty::isWritable() reports them
     correctly, and external writes raise "Cannot modify private(set)
     property" instead of the previous readonly modification error.
     (David Carlier)
-  . Fixed Dom\Notation nodes missing tree connection, so that
-    ownerDocument, parentNode, isConnected and baseURI now return correct
-    values, and textContent returns NULL per the DOM specification.
-    (jordikroon)
+  . Fixed Dom\Notation nodes missing tree connection, so that ownerDocument,
+    parentNode, isConnected and baseURI now return correct values, and
+    textContent returns NULL per the DOM specification. (jordikroon)

 - EXIF:
   . Added support for reading EXIF metadata from WebP images (GH-19904).
@@ -71,8 +70,8 @@ PHP                                                                        NEWS

 - GMP:
   . gmp_fact() reject values larger than unsigned long. (David Carlier)
-  . gmp_pow/binomial/root/rootrem and shift/pow operators reject values
-    larger than unsigned long. (David Carlier)
+  . gmp_pow/binomial/root/rootrem and shift/pow operators reject values larger
+    than unsigned long. (David Carlier)
   . GMP exponentiation and shift operators now emit a deprecation warning
     when converting a float right operand to int loses precision. (Weilin Du)

@@ -111,8 +110,8 @@ PHP                                                                        NEWS
     (Juan Morales)

 - Fibers:
-  . Fixed bug GH-20483 (ASAN stack overflow with fiber.stack_size INI
-    small value). (David Carlier)
+  . Fixed bug GH-20483 (ASAN stack overflow with fiber.stack_size INI small
+    value). (David Carlier)

 - Mail:
   . Fixed bug GH-20862 (null pointer dereference in
@@ -158,12 +157,12 @@ PHP                                                                        NEWS
     (KentarouTakeda)

 - PGSQL:
-  . Enabled 64 bits support for pg_lo_truncate()/pg_lo_tell()
-    if the server supports it. (KentarouTakeda)
-  . pg_fetch_object() now surfaces non-instantiable class errors
-    before fetching, resolves the constructor via the get_constructor
-    handler, and reports the empty-constructor ValueError on the
-    $constructor_args argument. (David Carlier)
+  . Enabled 64 bits support for pg_lo_truncate()/pg_lo_tell() if the server
+    supports it. (KentarouTakeda)
+  . pg_fetch_object() now surfaces non-instantiable class errors before
+    fetching, resolves the constructor via the get_constructor handler, and
+    reports the empty-constructor ValueError on the $constructor_args argument.
+    (David Carlier)

 - Phar:
   . Support reference values in Phar::mungServer(). (ndossche)
@@ -186,8 +185,7 @@ PHP                                                                        NEWS
   . Fixed bug GH-20217 (ReflectionClass::isIterable() incorrectly returns true
     for classes with property hooks). (alexandre-daubois)
   . Added ReflectionConstant::inNamespace(). (Khaled Alam)
-  . Added ReflectionProperty::isReadable() and ReflectionProperty::isWritable().
-    (ilutov)
+  . Added ReflectionProperty::isReadable() and ::isWritable(). (ilutov)
   . Fixed bug GH-21362 (ReflectionMethod::invoke/invokeArgs() did not verify
     Closure instance identity for Closure::__invoke()). (Ilia Alshanetsky)
   . Added ReflectionParameter::getDocComment(). (chschneider)
@@ -233,12 +231,12 @@ PHP                                                                        NEWS
 - SPL:
   . DirectoryIterator key can now work better with filesystem supporting larger
     directory indexing. (David Carlier)
-  . Fixed bug GH-21831 (SplObjectStorage::removeAllExcept() use-after-free
-    with re-entrant getHash()). (Pratik Bhujel)
+  . Fixed bug GH-21831 (SplObjectStorage::removeAllExcept() use-after-free with
+    re-entrant getHash()). (Pratik Bhujel)
   . Fix bugs GH-8561, GH-8562, GH-8563, and GH-8564 (Fixing various
     SplFileObject iterator desync bugs). (iliaal)
-  . Fix bug GH-22062 (SplDoublyLinkedList iterator UAF
-    via destructor releasing next node). (David Carlier)
+  . Fix bug GH-22062 (SplDoublyLinkedList iterator UAF via destructor releasing
+    next node). (David Carlier)

 - Sysvshm:
   . Fixed shm_attach() to throw ValueError for keys outside the key_t range.
@@ -269,19 +267,19 @@ PHP                                                                        NEWS
   . linkinfo() now raises a ValueError when the argument is an empty string.
     (Weilin Du)
   . getenv() and putenv() now raises a ValueError when the first argument
-    contains null bytes. (Weilin Du)
-  . dl() now raises a ValueError when the $extension_filename argument
-    contains null bytes. (Weilin Du)
-  . openlog() now raises a ValueError when the $prefix argument contains
-    null bytes. (Weilin Du)
-  . parse_str() now raises a ValueError when the $string argument contains
-    null bytes. (Weilin Du)
-  . proc_open() now raises a ValueError when the $cwd argument contains
-    null bytes. (Weilin Du)
+    contains NUL bytes. (Weilin Du)
+  . dl() now raises a ValueError when the $extension_filename argument contains
+    NUL bytes. (Weilin Du)
+  . openlog() now raises a ValueError when the $prefix argument contains NUL
+    bytes. (Weilin Du)
+  . parse_str() now raises a ValueError when the $string argument contains NUL
+    bytes. (Weilin Du)
+  . proc_open() now raises a ValueError when the $cwd argument contains NUL
+    bytes. (Weilin Du)
   . ini_get_all() now includes the built-in default value in the details.
     (sebastian)
-  . Fixed bug GH-22171 (Invalid auth header generation in
-    http(s) stream wrapper). (David Carlier)
+  . Fixed bug GH-22171 (Invalid auth header generation in http(s) stream
+    wrapper). (David Carlier)

 - Streams:
   . Added new stream errors API including new StreamException, StreamError
@@ -303,12 +301,11 @@ PHP                                                                        NEWS
     filters). (Jakub Zelenka)

 - URI:
-  . Added Uri\Rfc3986\Uri:getUriType() and Uri\WhatWg\Url:isSpecialScheme().
-    (kocsismate)
-  . Added Uri\Rfc3986\Uri:getHostType() and Uri\WhatWg\Url:getHostType().
+  . Added Uri\Rfc3986\Uri::getUriType() and Uri\WhatWg\Url::isSpecialScheme().
     (kocsismate)
-  . Added Uri\Rfc3986\UriBuilder.
+  . Added Uri\Rfc3986\Uri::getHostType() and Uri\WhatWg\Url::getHostType().
     (kocsismate)
+  . Added Uri\Rfc3986\UriBuilder. (kocsismate)

 - Zip:
   . Fixed ZipArchive callback being called after executor has shut down.
diff --git a/UPGRADING b/UPGRADING
index 14bbb9ecc39..1ae5bbe1f40 100644
--- a/UPGRADING
+++ b/UPGRADING
@@ -30,9 +30,8 @@ PHP 8.6 UPGRADE NOTES
     accurately.

 - GD:
-  . imagesetstyle(), imagefilter() and imagecrop() filter their
-    array arguments types/values and raise a TypeError/ValueError
-    accordingly.
+  . imagesetstyle(), imagefilter() and imagecrop() filter their array arguments
+    types / values and raise a TypeError / ValueError accordingly.

 - Intl:
   . Passing a non-stringable object as a time zone to Intl APIs that accept
@@ -63,13 +62,13 @@ PHP 8.6 UPGRADE NOTES
     This is consistent with other preg_* functions.

 - Phar:
-  . Phar::mungServer() now raises a ValueError when an invalid
-    argument value is passed instead of being silently ignored.
-  . Phar::addEmptyDir() now rejects `/.phar` paths in addition to `.phar`
+  . Phar::mungServer() now raises a ValueError when an invalid argument value
+    is passed instead of being silently ignored.
+  . Phar::addEmptyDir() now rejects "/.phar" paths in addition to ".phar"
     paths, and raises the same BadMethodCallException for attempts to create
     the reserved magic ".phar" directory through that form.
   . Phar::addEmptyDir() now treats non-magic names that merely share the
-    `.phar` prefix as ordinary directories.
+    ".phar" prefix as ordinary directories.

 - PGSQL:
   . pg_fetch_object() now reports the ValueError for a non-empty
@@ -86,11 +85,11 @@ PHP 8.6 UPGRADE NOTES

 - Session:
   . Setting session.cookie_path, session.cookie_domain, or session.cache_limiter
-    to a value containing null bytes now emits a warning and leaves the setting
-    unchanged. Previously, null bytes were silently accepted: for cookie_path and
-    cookie_domain this caused the SAPI to drop the Set-Cookie header; for
-    cache_limiter the value was silently truncated at the null byte.
-  . A ValueError is not thrown if $name is a string containing null bytes in
+    to a value containing NUL bytes now emits a warning and leaves the setting
+    unchanged. Previously, NUL bytes were silently accepted: for cookie_path
+    and cookie_domain this caused the SAPI to drop the Set-Cookie header; for
+    cache_limiter the value was silently truncated at the NUL byte.
+  . A ValueError is not thrown if $name is a string containing NUL bytes in
     session_module_name().
   . session_encode() now returns an empty string instead of false for empty
     sessions. It only returns false now when the session data could not be
@@ -132,49 +131,48 @@ PHP 8.6 UPGRADE NOTES
   . SplObjectStorage::getHash() implementations may no longer mutate any
     SplObjectStorage instance. Attempting to do so now throws an Error.
   . SplFileObject::next() now advances the stream when no prior current()
-    call has cached a line. A subsequent current() call returns the new
-    line rather than the previous one.
-  . SplFileObject::fgets() no longer caches the returned line for
-    subsequent current() calls. current() now re-reads from the current
-    stream position instead of returning the line fgets() just returned.
-  . SplFileObject::next() past EOF no longer increments key() without
-    bound. SplFileObject::seek() past EOF now produces the same key()
-    value as SplTempFileObject; the two previously returned different
-    values.
+    call has cached a line. A subsequent current() call returns the new line
+    rather than the previous one.
+  . SplFileObject::fgets() no longer caches the returned line for subsequent
+    current() calls. current() now re-reads from the current stream position
+    instead of returning the line fgets() just returned.
+  . SplFileObject::next() past EOF no longer increments key() without bound.
+    SplFileObject::seek() past EOF now produces the same key() value as
+    SplTempFileObject; the two previously returned different values.

 - Standard:
   . Form feed (\f) is now added in the default trimmed characters of trim(),
-    rtrim() and ltrim(). RFC: https://wiki.php.net/rfc/trim_form_feed
-  . array_filter() now raises a ValueError when an invalid $mode
-    argument value is passed.
+    rtrim() and ltrim().
+    RFC: https://wiki.php.net/rfc/trim_form_feed
+  . array_filter() now raises a ValueError when an invalid $mode argument value
+    is passed.
   . array_change_key_case() now raises a ValueError when an invalid $case
     argument value is passed.
   . getenv() and putenv() now raises a ValueError when the first argument
-    contains null bytes.
-  . dl() now raises a ValueError when the $extension_filename argument
-    contains null bytes.
-  . openlog() now raises a ValueError when the $prefix argument contains
-    null bytes.
-  . parse_str() now raises a ValueError when the $string argument contains
-    null bytes.
+    contains NUL bytes.
+  . dl() now raises a ValueError when the $extension_filename argument contains
+    NUL bytes.
+  . openlog() now raises a ValueError when the $prefix argument contains NUL
+    bytes.
+  . parse_str() now raises a ValueError when the $string argument contains NUL
+    bytes.
   . linkinfo() now raises a ValueError when the $path argument is empty.
-  . pathinfo() now raises a ValueError when an invalid $flag
-    argument value is passed.
-  . scandir() now raises a ValueError when an invalid $sorting_order
-    argument value is passed.
-  . proc_open() now raises a ValueError when the $cwd argument contains
-    null bytes.
+  . pathinfo() now raises a ValueError when an invalid $flag argument value is
+    passed.
+  . scandir() now raises a ValueError when an invalid $sorting_order argument
+    value is passed.
+  . proc_open() now raises a ValueError when the $cwd argument contains NUL
+    bytes.

 - Zip:
-  . ZipArchive::extractTo now raises a TypeError for the
-    files argument if one or more of the entries is not
-    a string.
+  . ZipArchive::extractTo now raises a TypeError for the files argument if one
+    or more of the entries is not a string.

 - Zlib:
-  . deflate_init() now raises a TypeError when the value for option
-    "level", "memory", "window", or "strategy" is not of type int.
-  . inflate_init() now raises a TypeError when the value for option
-    "window" is not of type int.
+  . deflate_init() now raises a TypeError when the value for option "level",
+    "memory", "window", or "strategy" is not of type int.
+  . inflate_init() now raises a TypeError when the value for option "window" is
+    not of type int.

 ========================================
 2. New Features
@@ -183,14 +181,14 @@ PHP 8.6 UPGRADE NOTES
 - Core:
   . It is now possible to use reference assign on WeakMap without the key
     needing to be present beforehand.
-  . It is now possible to define the `__debugInfo()` magic method on enums.
+  . It is now possible to define the __debugInfo() magic method on enums.
     RFC: https://wiki.php.net/rfc/debugable-enums

 - Curl:
-  . curl_getinfo() return array now includes a new size_delivered key,
-    which indicates the total number of bytes passed to the download
-    write callback. This value can also be obtained by passing
-    CURLINFO_SIZE_DELIVERED as the $option parameter.
+  . curl_getinfo() return array now includes a new size_delivered key, which
+    indicates the total number of bytes passed to the download write callback.
+    This value can also be obtained by passing CURLINFO_SIZE_DELIVERED as the
+    $option parameter.
     Requires libcurl 8.20.0 or later.

 - Fileinfo:
@@ -250,9 +248,9 @@ PHP 8.6 UPGRADE NOTES
     value is one of the following strings "preserve", "reset", or "strict".

 - URI:
-  . Added Uri\Rfc3986\Uri:getUriType() and Uri\WhatWg\Url:isSpecialScheme().
+  . Added Uri\Rfc3986\Uri::getUriType() and Uri\WhatWg\Url::isSpecialScheme().
     RFC: https://wiki.php.net/rfc/uri_followup#uri_type_detection
-  . Added Uri\Rfc3986\Uri:getHostType() and Uri\WhatWg\Url:getHostType().
+  . Added Uri\Rfc3986\Uri::getHostType() and Uri\WhatWg\Url::getHostType().
     RFC: https://wiki.php.net/rfc/uri_followup#host_type_detection
   . Added Uri\Rfc3986\UriBuilder.
     RFC: https://wiki.php.net/rfc/uri_followup#uri_building
@@ -284,21 +282,20 @@ PHP 8.6 UPGRADE NOTES
 ========================================

 - GMP:
-  . gmp_fact() now throws a ValueError() if $num does not fit into
-    a unsigned long.
+  . gmp_fact() now throws a ValueError() if $num does not fit into a unsigned
+    long.
   . gmp_pow(), gmp_binomial(), gmp_root() and gmp_rootrem() now throw a
     ValueError if their second argument does not fit into an unsigned long.
-  . The shift (<<, >>) and exponentiation (**) operators on GMP objects
-    now throw a ValueError if the right operand does not fit into an
-    unsigned long.
-  . gmp_powm() modulo-by-zero now raises a DivisionByZeroError whose
-    message includes the function name and argument index ($modulus).
+  . The shift (<<, >>) and exponentiation (**) operators on GMP objects now
+    throw a ValueError if the right operand does not fit into an unsigned long.
+  . gmp_powm() modulo-by-zero now raises a DivisionByZeroError whose message
+    includes the function name and argument index ($modulus).

 - mysqli:
-  . The return structure of mysqli_get_charset() no longer contains
-    the undocumented "comment" element. The value of "charsetnr" is
-    now set to a constant 0 as this number was an implementation detail
-    that should not have been exposed to the public.
+  . The return structure of mysqli_get_charset() no longer contains the
+    undocumented "comment" element. The value of "charsetnr" is now set to a
+    constant 0 as this number was an implementation detail that should not have
+    been exposed to the public.

 - OpenSSL:
   . Output of openssl_x509_parse() contains criticalExtensions listing all
@@ -318,9 +315,9 @@ PHP 8.6 UPGRADE NOTES

 - Standard:
   . ini_get_all() now includes a "builtin_default_value" element for each
-    directive when $details is true. It holds the built-in default value of
-    the directive (or null if it has none), independent of values set in
-    php.ini, on the command line, or at runtime.
+    directive when $details is true. It holds the built-in default value of the
+    directive (or null if it has none), independent of values set in php.ini,
+    on the command line, or at runtime.

 ========================================
 6. New Functions
@@ -328,30 +325,30 @@ PHP 8.6 UPGRADE NOTES

 - Reflection:
   . ReflectionConstant::inNamespace()
-  . Added ReflectionProperty::isReadable() and ReflectionProperty::isWritable().
+  . ReflectionProperty::isReadable() and ReflectionProperty::isWritable()
     RFC: https://wiki.php.net/rfc/isreadable-iswriteable
-  . Added ReflectionParameter::getDocComment().
+  . ReflectionParameter::getDocComment().
     RFC: https://wiki.php.net/rfc/parameter-doccomments

 - Intl:
-  . `grapheme_strrev()` returns strrev for grapheme cluster unit.
+  . grapheme_strrev() returns strrev for grapheme cluster unit.
     RFC: https://wiki.php.net/rfc/grapheme_strrev

 - mysqli:
-  . Added `mysqli::quote_string()` and `mysqli_quote_string()`.
+  . Added mysqli::quote_string() and mysqli_quote_string().
     RFC: https://wiki.php.net/rfc/mysqli_quote_string

 - Standard:
-  . `clamp()` returns the given value if in range, else return the nearest
+  . clamp() returns the given value if in range, else return the nearest
     bound.
     RFC: https://wiki.php.net/rfc/clamp_v2
-  . `stream_last_errors()` and `stream_clear_errors()`.
+  . stream_last_errors() and stream_clear_errors().
     RFC: https://wiki.php.net/rfc/stream_errors
-  . stream_socket_get_crypto_status()
+  . stream_socket_get_crypto_status().

 - Zip:
-  . Added ZipArchive::openString() method.
-  . Added ZipArchive::closeString() method.
+  . ZipArchive::openString()
+  . ZipArchive::closeString()

 ========================================
 7. New Classes and Interfaces
@@ -471,7 +468,7 @@ PHP 8.6 UPGRADE NOTES
 ========================================

 - Core:
-  . `printf()` using only `%s` and `%d` will be compiled into the equivalent
+  . printf() using only "%s" and "%d" will be compiled into the equivalent
     string interpolation, avoiding the overhead of a function call and
     repeatedly parsing the format string.
   . Arguments are now passed more efficiently to known constructors (e.g. when