Static Properties

../_images/static_properties.png

It is easy to read that the property $x is of type Test (via static), with an impossible default value of 0. In fact, this property is not typed, as using static is not a possible type for properties.

Secondly, static properties are inherited and shared with the parent static properties, unless they are declared again. In that case, they are distinct.

See Also

PHP Features