views:

56

answers:

2

Hello everyone. When are static properties initialized, as I know other member properties are initialized when object is created.

Thanks

+2  A: 

Declaring class properties or methods as static makes them accessible without needing an instantiation of the class. A property declared as static can not be accessed with an instantiated class object (though a static method can).

/ http://php.net/manual/en/language.oop5.static.php

So, they are available after they have been declared.

The MYYN
+1  A: 

Static properties? Do you mean static variables or methods?

Either way, they are initialized when the script is parsed, or the class is defined.

thephpdeveloper