#37549 [Bgs]: continue with while/do-while
| From: | mgf@php.net | Date: | Mon, 22 May 2006 15:14:50 +0000 |
| Subject: | #37549 [Bgs]: continue with while/do-while | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-97447@lists.php.net to get a copy of this message | ||
ID: 37549
Updated by: mgf@php.net
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:
Of course you can -- and you are. The behaviour you are getting is
expected. This is a support issue, not a bug, so try asking in the
php-general list (but, hint: think about when your ++ increment is
happening).
Previous Comments:
------------------------------------------------------------------------
[2006-05-22 14:20:37] violetphp at yahoo dot co dot jp
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.
------------------------------------------------------------------------
[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