Hi internals
Looking through the language grammer I discovered that switch cases can also be
terminated with a `;` instead of a `:`.
```
switch ($i) {
case 1;
return 1;
default;
return 2;
}
```
https://3v4l.org/o7nD8
This is in fact documented:
https://www.php.net/manual/en/control-structures.switch.php
What's the reasoning behind this? I find it weird an inconsistent.
Maybe something to deprecate in PHP 8.0.
https://wiki.php.net/rfc/deprecations_php_8_0
Regards
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php