#37549 [Bgs]: continue with while/do-while
| From: | violetphp at yahoo dot co dot jp | Date: | Mon, 22 May 2006 14:20:37 +0000 |
| Subject: | #37549 [Bgs]: continue with while/do-while | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-97445@lists.php.net to get a copy of this message | ||
ID: 37549
User updated by: violetphp at yahoo dot co dot jp
Reported By: violetphp at yahoo dot co dot jp
Status: Bogus
Bug Type: *General Issues
Operating System: windowsXP
PHP Version: 5.1.4
New Comment:
Thank you for your reply,Johannes!
I know 'break',of course.
But,'break' means the other.
Can't I continue the loop?
Thanks.
Best Regards.
Previous Comments:
------------------------------------------------------------------------
[2006-05-22 13:59:40] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Maybe you want \"break\" isntead of \"continue\".
------------------------------------------------------------------------
[2006-05-22 13:55:04] violetphp at yahoo dot co dot jp
Description:
------------
Cannot use continue keyword with while/do-while.
Reproduce code:
---------------
$a = 0;
do{
if($a == 5)
continue;
print "$a";
$a++;
}while($a < 10);
//OR
$b = 0;
while($b < 10){
if($b == 5)
continue;
print "$b";
$b++;
}
Expected result:
----------------
012346789012346789
Actual result:
--------------
Timeout...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37549&edit=1