Date: 01/17/01
- Next message: Shaun Batterton: "Re: [PHP-DEV] Re: [PHP] calling static class functions using a function variable"
- Previous message: Harald Radi: "AW: [PHP-DEV] PHP 4.0 Bug #8767: user name prepended to table names in query"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: godai <email protected>
Operating system: Linux
PHP version: 4.0.3pl1
PHP Bug Type: Scripting Engine problem
Bug description: 'continue' inside of 'switch' statement acts like 'break' instead of 'continue'
When a continue is used inside of a switch statement (inside a loop), it does not jump to the top of the next
loop iteration, but instead jumps out of the switch statement and proceeds to execute the code following the
switch. The following code snippet should give a good example:
<?php
for( $i = 0; $i < 10; $i++ ) {
switch( $i ) {
case 5:
continue;
default:
$garbage = 0; // do something unimportant
}
echo "$i<BR>";
}
?>
The output *should* be the numbers 0 to 4 & 6 to 9 listed down the screen, skipping 5. Instead, 5 appears
in the list making it a complete 0 to 9.
-- Edit Bug report at: http://bugs.php.net/?id=8768&edit=1-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Shaun Batterton: "Re: [PHP-DEV] Re: [PHP] calling static class functions using a function variable"
- Previous message: Harald Radi: "AW: [PHP-DEV] PHP 4.0 Bug #8767: user name prepended to table names in query"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

