Ok, all jokes aside...
I just noticed that I was able to refer to a static class propery using $this::$name. I don't remember ever running across that before since I always used self::$name or $this->name in my classes.
In what version of PHP did $this start working with static class properties?
From the PHP5 changelog, v5.3.0 ( http://php.net/ChangeLog-5.php#5.3.0 ):
Added support for dynamic access of static members using $foo::myFunc(). (Etienne Kneuss)
So I suppose it's a fairly recent occurrence. :)
(Oh, and this refers to calling methods statically...I wonder if it's the same for accessing properties.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With