Дата публикации: 28 августа 2008
Declaring class members or methods as static makes them accessible without needing an instantiation of the class. A member declared as static can not be accessed with an instantiated class object (though a static method can).
For compatibility with PHP 4, if no visibility declaration is used, then the member or method will be treated as if it was declared as public.
Because static methods are callable without an instance of the object created, the pseudo variable $this is not available inside the method declared as static.
Static properties cannot be accessed through the object using the arrow operator ->.
Calling non-static methods statically generates an E_STRICT level warning.
As of PHP 5.3.0, it`s possible to reference the class using a variable. Keywords like self, parent or static are not allowed in dynamic class references.
28 июня 2017 Комплаенс и антикоррупция в России и СНГВсе события