Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions language/types/array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down