tags:

views:

120

answers:

2

Is there any other way to access a static variable from a static method, other than using classname::$variable?

+1  A: 

self::$variable, if it's in the same class.

Alexander Konstantinov
Worked perfectly. Thanks!
Adam
+1  A: 

If it is different class:

classname::$variable

If it is same class:

self::$variable
Sarfraz