Re: PHP 4.0 Bug #8428 Updated: continue doesn't pass thru a switch statement

From: Date: Sat, 06 Jan 2001 04:45:28 +0000
Subject: Re: PHP 4.0 Bug #8428 Updated: continue doesn't pass thru a switch statement
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-43119@lists.php.net to get a copy of this message
Well, if one relies on buggy behavior, where buggy == different from documentation; in this case the manual clearly states that: "continue is used within looping structures to skip the rest of the current loop iteration and continue execution at the beginning of the next iteration" - no if's and then's, they must be ready for a surprise... Anyway, I'm just saying +1.. my 0.02. At 05:33 6.1. 2001, Zak Greant wrote the following: -------------------------------------------------------------- >Cynic wrote: >> Um, I don't know. This looks to me like trying to hide problems/ >> inconsistencies/bugs too easily. :) I think it should stay in >> the bug realm. >> I, just like the other guy, consider this a bug. What good >> is continue within switch if it's the same as break, while it's >> clearly (meant to be) something different? It could as well >> trigger an error: 'use break instead'. > > We should ask the core developers how they want continue + > switch to work. I would guess that it was an oversight when > they were writing the language parser, but you never know... > > If it comes to group concensus, my vote is to change switch > to handle continue like if. > > The reason that I classed it as a feature request is because > switch + continue has behaved in this way for a long time. > > The behavior the user wants can be achieved with a minor > modification to their code. However, if PHP gets changed > to accomodate the behavior that the user wants, then other > people may have to change their code. > > Just my 0.02 cents > > --zak ------end of quote------ ____________________________________________________________ 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

« previous php.dev (#43119) next »