On 07/04/2026 17:20, Larry Garfield wrote:
We've updated the RFC to address the break question (new section), the continue
question (which is now a secondary vote)
You are still relying on an incorrect explanation of the relationship
between "switch" and "continue":
> This behavior is due to a quirk of PHP's design, where |switch| is
treated as a looping structure, which most languages do not.
"continue" is counted for switch statements not because it is "treated
as a loop", but because PHP has numbered break and continue targets.
Numbering break targets differently from continue targets would be
extremely confusing, so they have to target the same list of constructs.
There was strong consensus on this point in the previous discussion.
I can only see three defensible options:
1) Support neither "break" nor "continue". This would be consistent with
"if", "try", etc, which you have used as comparisons in the RFC.
2) Support "break", and have a Warning on "continue". This would be
consistent with "switch", and harmless.
3) Support "break", and have an Error on "continue". This would be novel
behaviour, but not dangerous.
Personally, I'm leaning towards option 1 - the case for "break" feels
weak to me.
Regards,
--
Rowan Tommins
[IMSoP]