1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-24 15:52:15 +01:00

Document autovivification from false deprecation. (#1126)

This commit is contained in:
Yoshinari Takaoka
2021-11-27 01:38:00 +09:00
committed by GitHub
parent 669c19f74e
commit c140370c35

View File

@@ -422,7 +422,7 @@ $arr[] = <replaceable>value</replaceable>;
// <replaceable>value</replaceable> may be any value of any type</synopsis>
<para>
If <varname>$arr</varname> doesn't exist yet, it will be created, so this is
If <varname>$arr</varname> doesn't exist yet or is set to &null; or &false;, it will be created, so this is
also an alternative way to create an <type>array</type>. This practice is
however discouraged because if <varname>$arr</varname> already contains
some value (e.g. <type>string</type> from request variable) then this
@@ -437,6 +437,12 @@ $arr[] = <replaceable>value</replaceable>;
error. Formerly, the string was silently converted to an array.
</simpara>
</note>
<note>
<simpara>
As of PHP 8.1.0, creating a new array from &false; value is deprecated.
Creating a new array from &null; and undefined values is still allowed.
</simpara>
</note>
<para>
To change a certain