Re: Reclassify E_STRICT notices

From: Date: Mon, 02 Mar 2015 18:37:33 +0000
Subject: Re: Reclassify E_STRICT notices
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
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.

-- 
Stas Malyshev
[email protected]


Thread (16 messages)

« previous php.internals (#84177) next »