Doc #79054 [NEW]: Wrong indistinguishable point about current() function

From: Date: Thu, 02 Jan 2020 09:44:45 +0000
Subject: Doc #79054 [NEW]: Wrong indistinguishable point about current() function
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-17177@lists.php.net to get a copy of this message
From: mumumu Operating system: PHP version: Irrelevant Package: Documentation problem Bug Type: Documentation Problem Bug description:Wrong indistinguishable point about current() function Description: ------------ https://www.php.net/manual/en/function.current.php We describe wrong indistinguishable point about current() function. When array points the end of an array, current() returns not boolean false but the last element. Index: reference/array/functions/current.xml =================================================================== --- reference/array/functions/current.xml (revision 348749) +++ reference/array/functions/current.xml (working copy) @@ -99,8 +99,8 @@ &reftitle.notes; <note> <simpara> - The end of an array and the result of calling - <function>current</function> on an empty array + The result of calling <function>current</function> on an empty array + and array pointing beyond the end of the elements are indistinguishable from a <type>boolean</type> &false; element. To properly traverse an array which may contain &false; elements, see the <function>foreach</function> function. -- Edit bug report at https://bugs.php.net/bug.php?id=79054&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79054&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79054&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79054&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79054&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79054&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79054&r=support Expected behavior: https://bugs.php.net/fix.php?id=79054&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79054&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79054&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79054&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79054&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79054&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79054&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79054&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79054&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79054&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79054&r=mysqlcfg

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