note 110209 added to control-structures.while
| From: | Anonymous | Date: | Mon, 01 Oct 2012 10:06:07 +0000 |
| Subject: | note 110209 added to control-structures.while | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-191084@lists.php.net to get a copy of this message | ||
to: ravenswd at gmail dot com 05-Mar-2010 11:34
Your method is inefficient because preprocessor is checking statement twice instead once and you are
allocating unnecessary variable.
I suggest you to do it right by putting conditional statement into while loop statement like:
<?php
while (true):
// code
endwhile;
?>
Code you proposed is definitely not a improvement.
----
Server IP: 69.147.83.199
Probable Submitter: 178.37.114.149
----
Manual Page -- http://www.php.net/manual/en/control-structures.while.php
Edit -- https://master.php.net/note/edit/110209
Del: integrated -- https://master.php.net/note/delete/110209/integrated
Del: useless -- https://master.php.net/note/delete/110209/useless
Del: bad code -- https://master.php.net/note/delete/110209/bad+code
Del: spam -- https://master.php.net/note/delete/110209/spam
Del: non-english -- https://master.php.net/note/delete/110209/non-english
Del: in docs -- https://master.php.net/note/delete/110209/in+docs
Del: other reasons-- https://master.php.net/note/delete/110209
Reject -- https://master.php.net/note/reject/110209
Search -- https://master.php.net/manage/user-notes.php