[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-cvs
Subject:    [DOC-CVS] [doc-en] master: Document autovivification from false deprecation. (#1126)
From:       Yoshinari Takaoka via GitHub <noreply () php ! net>
Date:       2021-11-26 16:37:17
Message-ID: 5cBMjY4H6HhwHpIzsxA8VYkdtyVPr9ThlE5M2FdBqU () main ! php ! net
[Download RAW message or body]

Author: Yoshinari Takaoka (mumumu)
Committer: GitHub (web-flow)
Pusher: mumumu
Date: 2021-11-27T01:38:00+09:00

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


Document autovivification from false deprecation. (#1126)

Changed paths:
  M  language/types/array.xml


Diff:

diff --git a/language/types/array.xml b/language/types/array.xml
index a8e2985d7f..226936b83d 100644
--- a/language/types/array.xml
+++ b/language/types/array.xml
@@ -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

-- 
PHP Documentation Commits Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic