Re: [VOTE] match expression
| From: | Ilija Tovilo | Date: | Wed, 29 Apr 2020 06:41:07 +0000 |
| Subject: | Re: [VOTE] match expression | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-109903@lists.php.net to get a copy of this message | ||
> Or for that matter... is anyone actually using that syntax in the wild, or is it hypothetical?
It's quite common in C (you can't declare variables directly in a
switch case) so I'd guess it would be used at least by some people in
PHP.
The worst part is that your code wouldn't throw, it would just start
behaving differently.
Looking at grep.app you'll find quite a few of them.
https://grep.app/search?q=%3A%20%7B&filter[lang][0]=PHP
(Note that searching with regex won't work as that only shows a very
small subset of results.)
Ilija