On Mon, Mar 2, 2015 at 7:37 PM, Stanislav Malyshev <[email protected]>
wrote:
> Hi!
>
> > About the accessing static property non statically, I would have thrown
> an
> > E_ERROR : the property simply doesn't exist. Class properties should be
> > accessed using the class, not an instance of it , IMO.
>
> Sometimes, there's no fixed class but there's an object of this class.
> Doing something like $klass = get_class($foo); $klass::property is
> possible, but $foo->property is easier.
>
Doing $obj::$property is possible as well, it does the same as
get_class($obj)::$property.
Nikita