Skip to content

Commit

Permalink
language/types/array: Mention null destructuring special case
Browse files Browse the repository at this point in the history
  • Loading branch information
tgr committed Aug 24, 2024
1 parent e2db993 commit 8f827b6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions language/types/array.xml
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,13 @@ $secondElement = getArray()[1];
<note>
<para>
Array dereferencing a scalar value which is not a <type>string</type>
yields &null;. Prior to PHP 7.4.0, that did not issue an error message.
As of PHP 7.4.0, this issues <constant>E_NOTICE</constant>;
as of PHP 8.0.0, this issues <constant>E_WARNING</constant>.
or &null; yields &null;. Prior to PHP 7.4.0, that did not
issue an error message. As of PHP 7.4.0, this issues
<constant>E_NOTICE</constant>; as of PHP 8.0.0, this issues
<constant>E_WARNING</constant>.
</para>
<para>
Array dereferencing &null; also yields &null; but issues no error.
</para>
</note>
</sect3>
Expand Down

0 comments on commit 8f827b6

Please sign in to comment.