Re: [RFC] switch expression
| From: | Stanislav Malyshev | Date: | Sun, 29 Mar 2020 21:54:24 +0000 |
| Subject: | Re: [RFC] switch expression | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-109433@lists.php.net to get a copy of this message | ||
Hi!
> My recommendation would be to just borrow Rust's keyword:
>
> $result = match ($var) {
> $expression => $expression;
> $expression => $expression;
> $expression => $expression;
> default => $expression;
> }
Yes, this would be much better idea.
--
Stas Malyshev
smalyshev@gmail.com