Is there any way to access a static variable of a PHP class without using the class prefix?
Example:
class A {
protected static $x = "blahblah";
public static function p() {
print(A::$x); // <= Is there no way to omit A:: ???
}
}
I understand, that at that point $x could be an uninitialized local variable, but it would make a lot of sense to be able to say/declare/set that in these cases the interpreter should resolve $x as the member declared earlier. Typing the class prefix everywhere is a major fail IMHO.