Re: Re: [RFC][DISCUSSION] Match expression v2
| From: | Ilija Tovilo | Date: | Tue, 23 Jun 2020 08:34:05 +0000 |
| Subject: | Re: Re: [RFC][DISCUSSION] Match expression v2 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-110704@lists.php.net to get a copy of this message | ||
Hi Benas
>> I'd like to announce the match expression v2 RFC:
>> https://wiki.php.net/rfc/match_expression_v2
> Then it's not a standalone expression but a block. In this case, you cannot add an
> optional semicolon at all.
>
> But this RFC v2 is not proposing to add a block, therefore you won't be allowed to use
>
match construct as a standalone expression anyways.
Using match as a standalone expression is definitely allowed, just
like any other expression.
// This is fine, the semicolon is required
match ($foo) {
$bar => baz(),
};
Ilija