Re: http://bugs.php.net/bugs.php?id=8428
| From: | Andi Gutmans | Date: | Sat, 06 Jan 2001 16:50:02 +0000 |
| Subject: | Re: http://bugs.php.net/bugs.php?id=8428 | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-43168@lists.php.net to get a copy of this message | ||
switch() is treated like a loop therefore you need to make the continue in your first example:
continue 2;
Andi
At 04:14 AM 1/6/2001 +0100, Cynic wrote:
a me-too for http://bugs.php.net/bugs.php?id=8428. the first loop prints 'no no' five times, the second one zero times. Apache 1.3.15-dev, PHP 4.0.4pl1 RC1 mod_php4, NT5 SP1. for($i=0; $i<5; ++$i) {switch( 1 ) { case 1 : continue ; } echo "no no\n" ;} for($i=0; $i<5; ++$i) {if( true ) { continue ; } echo "no no\n" ;} ____________________________________________________________ Cynic: A member of a group of ancient Greek philosophers who taught that virtue constitutes happiness and that self control is the essential part of virtue. cynic@mail.cz -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net For additional commands, e-mail: php-dev-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net