Thank you all for explaining.
This helps a lot!
Marc
On 09.03.20 10:27, Rowan Tommins wrote:
On Mon, 9 Mar 2020 at 05:38, Marc wrote:
Does it make sense? -> I have read "self::" all time as a shortcut for
"MyClass::" until I noticed this is not the case and I expect most PHP
devs would exp
On Mon, 9 Mar 2020 at 05:38, Marc wrote:
>
> Does it make sense? -> I have read "self::" all time as a shortcut for
> "MyClass::" until I noticed this is not the case and I expect most PHP
> devs would explain it this way.
>
> Is there a reason why self:: doesn't reset the internal "static" refer
On Mon, Mar 9, 2020 at 6:38 AM Marc wrote:
> Hi,
>
>
> On 08.03.20 17:54, Matthew Brown wrote:
> > This is expected behaviour given my understanding of how late static
> binding works:
> >
> > If there is a chain of “self::” calls that ultimately ends in
> “static::someMethod”, then PHP behaves a
Hi,
On 08.03.20 17:54, Matthew Brown wrote:
This is expected behaviour given my understanding of how late static binding
works:
If there is a chain of “self::” calls that ultimately ends in
“static::someMethod”, then PHP behaves as if every preceding call was a call to
“static::”, not “self
This is expected behaviour given my understanding of how late static binding
works:
If there is a chain of “self::” calls that ultimately ends in
“static::someMethod”, then PHP behaves as if every preceding call was a call to
“static::”, not “self::”. In your second call you’re explicitly overr
On 8 March 2020 09:47:37 GMT+00:00, Marc wrote:
>https://3v4l.org/NSdB8
>
>class A {
> static function call() {
> self::method();
>
> $self = self::class;
> $self::method();
> }
> static function method() { echo static::class; }
>}
>
>class B extends A {}
>
>B::
Hi,
I have reported a bug in Mai 2019 but did not get any response here
https://bugs.php.net/bug.php?id=77985.
The problem is that "static::class" as well as "get_called_class()" used
within a method resolves to a different class if this method was called
with "self::method". Interestingly