Re: Raising the precedence of the new operator

From: Date: Mon, 05 Apr 2021 18:20:56 +0000
Subject: Re: Raising the precedence of the new operator
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-113961@lists.php.net to get a copy of this message
> On Apr 5, 2021, at 1:51 PM, Claude Pache <claude.pache@gmail.com> wrote:
> 
>> Le 5 avr. 2021 à 19:42, Mike Schinkel <mike@newclarity.net> a écrit :
>> 
>> Foo::new()
>> 
>> That would be backward compatible because you currently cannot have a method named
>> new().
> 
> Really? The following compiles without hiccup for me: https://3v4l.org/Vb5Sj <https://3v4l.org/Vb5Sj>
Ah. I must have been remembering the failures from the 5.x days and not tried it since.

Well in that case, the solution to André request could be handled in userland.

-Mike
P.S. Too bad it works in 7.x and 8.x as that means it can never be added into PHP w/o BC breaks. :-(



Thread (14 messages)

« previous php.internals (#113961) next »