PHP 4.0 Bug #8428: continue doesn't pass thru a switch statement
| From: | ocomte at guarantycity dot com | Date: | Tue, 26 Dec 2000 18:34:59 +0000 |
| Subject: | PHP 4.0 Bug #8428: continue doesn't pass thru a switch statement | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-42282@lists.php.net to get a copy of this message | ||
From: ocomte@guarantycity.com
Operating system: Solaris 7
PHP version: 4.0.3pl1
PHP Bug Type: Unknown/Other Function
Bug description: continue doesn't pass thru a switch statement
in the script :
<?
for($i=0; $i<5; ++$i)
{ switch(1)
{ case 1:
continue;
}
echo "Not printable";
}
?>
the string is printed 5 times because the continue statement end the switch (like break). In C and
C++, and in the PHP manual the continue (unlike break) isn't affected by surrounding switch
statement and it seems logical to me.
--
Edit Bug report at: http://bugs.php.net/?id=8428&edit=1