On 2026-01-15 18:01, Larry Garfield wrote:
`continue` is really just to mirror what switch does with it.  If the
consensus is to simply disallow `continue` entirely (which is inconsistent with what switch does today), we're OK with that. I don't feel strongly
either way, so we're looking for a consensus.


Hey,

I think the benefit of `switch` supporting `continue` is to ensure consistency
in the number of breakable/continuable structures. Consider

    foreach ($a as $e) {
        switch ($e) {
            case 0:
                foreach ($x as $y) {
                    if (!$y) break 3;
                }
        }
    }

If I need to change `break` to `continue`, I will naturally change `break 3` to `continue 3`. I would suggest sticking to same in context managers — have it respected not because you would ever `continue` to exit it, but to have the onion layer numbers
consistent.

BR,
Juris

Reply via email to