class MyClass { public static $myStaticProperty = 'foo'; } echo MyClass::$myNonStaticProperty;
class MyClass { public static function myStaticMethod() { return 'bar'; } } $myObject = new MyClass(); echo $myObject->myStaticMethod();This code will result in a static error because the myStaticMethod() function is declared as static and should be accessed directly on the class, rather than through an instantiated object. The package library that includes support for PHP static errors is the core PHP library.