Bug #68995 [Opn->Wfx]: description of the "current" confused function in manual

From: Date: Thu, 19 Feb 2015 23:13:26 +0000
Subject: Bug #68995 [Opn->Wfx]: description of the "current" confused function in manual
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11954@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68995&edit=1 ID: 68995 Updated by: aharvey@php.net Reported by: wallacemaxters at gmail dot com Summary: description of the "current" confused function in manual -Status: Open +Status: Wont fix Type: Bug Package: Documentation problem PHP Version: 5.4.37 Block user comment: N Private report: N New Comment: Non-iterator objects are iterable like arrays, mostly for BC reasons. This is expected behaviour, but I don't think we should change the manual page to note that — effectively, it'll be treated like an array regardless, and it's confusing. Previous Comments: ------------------------------------------------------------------------ [2015-02-06 15:19:59] wallacemaxters at gmail dot com Description: ------------ why when I use "current (1)", it returns "current () Expects parameter 1 to be array, integer given"; however, when using "current (new stdClass)", it returns "false"? In manual, the current function is exemplified as follows: mixed current (array & $ array) At first, this might lead one to think that it only accepts array passed by reference as parameter. If this is the correct operation of the function, is there any possibility to change this statement in the manual? ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68995&edit=1

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