Re: instance version of match ?
| From: | Bruce Weirdan | Date: | Tue, 29 Mar 2022 01:46:35 +0000 |
| Subject: | Re: instance version of match ? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-117441@lists.php.net to get a copy of this message | ||
On Mon, Mar 28, 2022 at 7:56 PM Karoly Negyesi <karoly@negyesi.net> wrote:
> match ($object) {
> Someinterface => 'foo',
> AnotherInterface => 'bar',
> }
>
> this can not clash with any existing code as using identifiers like this
> are a syntax error currently.
That's valid code actually, see https://3v4l.org/BEcE4