rfc:continue_on_switch_deprecation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:continue_on_switch_deprecation [2018/06/24 16:11] – nikic | rfc:continue_on_switch_deprecation [2018/07/07 09:18] (current) – Mark as withdrawn nikic | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Author: Nikita Popov < | * Author: Nikita Popov < | ||
* Implementation: | * Implementation: | ||
- | * Status: | + | * Status: |
+ | |||
+ | **Based on the RFC discussion, we decided to instead implement this as a simple warning, which has happened in https:// | ||
===== Introduction ===== | ===== Introduction ===== | ||
Line 64: | Line 66: | ||
Continue can still be used inside switch statements, as long as it does not target the switch. The meaning of continue and break inside switch never changes, some cases are just forbidden. | Continue can still be used inside switch statements, as long as it does not target the switch. The meaning of continue and break inside switch never changes, some cases are just forbidden. | ||
+ | |||
+ | To further clarify which uses of '' | ||
+ | |||
+ | <code php> | ||
+ | while ($foo) { | ||
+ | switch ($bar) { | ||
+ | case " | ||
+ | while ($xyz) { | ||
+ | continue; | ||
+ | continue 2; // Targeting the switch: Deprecated | ||
+ | continue 3; // Targeting the outer while loop: Allowed | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
===== Vote ===== | ===== Vote ===== | ||
As this is a language change, a 2/3 majority is required. | As this is a language change, a 2/3 majority is required. |
rfc/continue_on_switch_deprecation.1529856712.txt.gz · Last modified: 2018/06/24 16:11 by nikic