Properties In Interfaces

../_images/property_in_interface.png

Since PHP 8.4, it is possible to have properties in an interface.

In fact, one must add a property to a property. Since this is an interface, that hook cannot have a body.

Hence, the hook has to be defined in every implementing class.

See Also

PHP Features