note 116266 added to control-structures.while

From: Date: Wed, 03 Dec 2014 19:55:25 +0000
Subject: note 116266 added to control-structures.while
Groups: php.notes 
Request: Send a blank email to php-notes+get-201058@lists.php.net to get a copy of this message
Is strange that the manual states... "Sometimes, if the while expression evaluates to FALSE from the very beginning, the nested statement(s) won't even be run once. " Because it can't be SOMETIMES If it behaves that way, then it is a bug, because it ALWAYS must not run the nested statement(s) even once if the WHILE expression evaluates to FALSE from the very beginning. Another way to exit the while loop is by using the BREAK statement.. see it in the manual. And if expression evaluates to NULL is the same as FALSE while (expression evals to NULL){ } ---- Server IP: 72.52.91.14 Probable Submitter: 189.197.160.230 ---- Manual Page -- http://php.net/manual/en/control-structures.while.php Edit -- https://master.php.net/note/edit/116266 Del: integrated -- https://master.php.net/note/delete/116266/integrated Del: useless -- https://master.php.net/note/delete/116266/useless Del: bad code -- https://master.php.net/note/delete/116266/bad+code Del: spam -- https://master.php.net/note/delete/116266/spam Del: non-english -- https://master.php.net/note/delete/116266/non-english Del: in docs -- https://master.php.net/note/delete/116266/in+docs Del: other reasons-- https://master.php.net/note/delete/116266 Reject -- https://master.php.net/note/reject/116266 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#201058) next »