On 27/06/18 16:59, Rowan Collins wrote:
On 27 June 2018 at 16:45, niel <spam-f...@blueyonder.co.uk> wrote:

On 24/06/18 17:16, Nikita Popov wrote:

Hi internals,

Another small deprecation for your consideration...

https://wiki.php.net/rfc/continue_on_switch_deprecation

Regards,
Nikita


Could you clarify the PHP 8 changes:

"PHP 8 generates a compile error."

Does this mean *any* use of continue in a switch is a compile error, or
only continue without a number



Neither:

Continue can still be used inside switch statements, as long as it does
not target the switch

The lines marked "Deprecated" in the examples are the ones which will be
compile errors.

This appears to contradict your 'neither'. `continue` as part of a `case` will always be a compile error in 8? Apologies if my mention of switch previously was ambiguous.

Will the PHP 8 version still require the programmer to count over the switches, i.e. in the third illustration, would the continue 3 still be needed for C-like behaviour? If that is true, then I really have no use for this proposal as it doesn't fix the problem, just moves it.

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to