[DOC-CVS] [doc-en] master: array: Updated notes for example 10 (#5578)

[email protected] (Narkunan via GitHub) Mon, 25 May 2026 17:17:46 +0000
Newsgroups php.doc.cvs
Message-ID <[email protected]>
Author: Narkunan (Narkunan)
Committer: GitHub (web-flow)
Pusher: jordikroon
Date: 2026-05-25T19:17:43+02:00

Commit: https://github.com/php/doc-en/commit/bfdd82f3f6cde571a61de3fcea28a03145374dda
Raw diff: https://github.com/php/doc-en/commit/bfdd82f3f6cde571a61de3fcea28a03145374dda.diff

array: Updated notes for example 10 (#5578)

* Updated notes for example 10 in arrays page

Co-authored-by: Jordi Kroon <[email protected]>

Changed paths:
  M  language/types/array.xml


Diff:

diff --git a/language/types/array.xml b/language/types/array.xml
index c2a49b2836fd..5ecc93e8d368 100644
--- a/language/types/array.xml
+++ b/language/types/array.xml
@@ -533,12 +533,12 @@ var_dump($arr);
    </example>
 
    <note>
-    <para>
-     As mentioned above, if no key is specified, the maximum of the existing
-     <type>int</type> indices is taken, and the new key will be that maximum
-     value plus 1 (but at least 0). If no <type>int</type> indices exist yet, the key will
-     be <literal>0</literal> (zero).
-    </para>
+    <simpara>
+     If no key is specified, the key will be the
+     maximum existing integer index + <literal>1</literal>. If the array has no positive
+     integer indices, the key will be <literal>0</literal>.
+     As of PHP 8.3.0, it can also be a negative integer.
+    </simpara>
 
     <para>
      Note that the maximum integer key used for this <emphasis>need not