On mardi 29 mars 2022 15:33:41 CEST Thomas Nunninger wrote:
> Hi,
>
> Am 29.03.22 um 14:34 schrieb Rowan Tommins:
> > On 29/03/2022 11:59, Robert Landers wrote:
> >> $object instanceof AnotherInterface => 'bar',
> >>
> >> We can see that `SomeInterface` will resolve the interface and
Hi,
Am 29.03.22 um 14:34 schrieb Rowan Tommins:
On 29/03/2022 11:59, Robert Landers wrote:
$object instanceof AnotherInterface => 'bar',
We can see that `SomeInterface` will resolve the interface and not the
constant.
Yeah, the instanceof operator is magic in that regard - it has
On 29/03/2022 11:59, Robert Landers wrote:
$object instanceof AnotherInterface => 'bar',
We can see that `SomeInterface` will resolve the interface and not the
constant.
Yeah, the instanceof operator is magic in that regard - it has a special
parsing rule to consume the next token
On Tue, Mar 29, 2022 at 3:47 AM Bruce Weirdan wrote:
>
> On Mon, Mar 28, 2022 at 7:56 PM Karoly Negyesi wrote:
> > match ($object) {
> > Someinterface => 'foo',
> > AnotherInterface => 'bar',
> > }
> >
> > this can not clash with any existing code as using identifiers like this
> > are a
On Mon, Mar 28, 2022 at 7:56 PM Karoly Negyesi 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
Hi,
May I suggest adding a little "instanceof" magic to match? Like this:
match ($object) {
Someinterface => 'foo',
AnotherInterface => 'bar',
}
this can not clash with any existing code as using identifiers like this
are a syntax error currently.
Currently you could do the same with