#37572 [Opn->Asn]: The Warning box for current() is incorrect

From: Date: Sat, 27 May 2006 08:00:22 +0000
Subject: #37572 [Opn->Asn]: The Warning box for current() is incorrect
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969373124@lists.php.net to get a copy of this message
ID: 37572 Updated by: gavinfo@php.net Reported By: phpbug-david at tulloh dot id dot au -Status: Open +Status: Assigned Bug Type: Documentation problem PHP Version: Irrelevant Assigned To: gavinfo Previous Comments: ------------------------------------------------------------------------ [2006-05-24 03:06:55] phpbug-david at tulloh dot id dot au Description: ------------ There is a warning box on the documentation for the current() function. It talks about the impossibility of differing between the end of the array and the value zero or "". It is possible to use current() with these values using the === operator. The real problem is arrays containing the value false, this isn't actually mentioned in the warning. Further the warning suggests using each() instead of current() to get around these problems, however the two functions aren't really comparable as each() advances the array cursor. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37572&edit=1

« previous php.doc (#969373124) next »