Doc #79606 [NEW]: Doc Bulid problem

From: Date: Sat, 16 May 2020 10:24:23 +0000
Subject: Doc #79606 [NEW]: Doc Bulid problem
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17578@lists.php.net to get a copy of this message
From: 1274364665 at qq dot com Operating system: MAC OS PHP version: 7.4.6 Package: Doc Build problem Bug Type: Documentation Problem Bug description:Doc Bulid problem Description: ------------ --- https://www.php.net/manual/en/language.types.array.php --- in the php docment about Arrays it is said "Converting NULL to an array results in an empty array." this is absolutely wrong .in fact if execute array(NULL),the result is not an empty array the array key will be 0 the array value will be NULL Test script: --------------- public function arrTest(){ $a = NULL; $arr = array($a); foreach ($arr as $key => $value) { var_dump($key); // 0 var_dump($value); // NULL } var_dump(count($arr)); // 1 exit; } -- Edit bug report at https://bugs.php.net/bug.php?id=79606&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79606&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79606&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79606&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79606&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79606&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79606&r=support Expected behavior: https://bugs.php.net/fix.php?id=79606&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79606&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79606&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79606&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79606&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79606&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79606&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79606&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79606&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79606&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79606&r=mysqlcfg

« previous php.doc.bugs (#17578) next »