Re: PHP 4.0 Bug #8428 Updated: continue doesn't pass thru a switch statement
| From: | Zak Greant | Date: | Sat, 06 Jan 2001 04:33:55 +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-43108@lists.php.net to get a copy of this message | ||
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