The
self
keyword is needed to access a static property from a static method in a class definition
class myClass {
    static $myProperty = 42;
    static function myMethod() {
        echo self::$myProperty;
    }
}

myClass::myMethod();
by Valeri Tandilashvili
4 years ago
PHP
OOP
1
Pro tip: use ```triple backticks around text``` to write in code fences