php8.5
Home/ Manual/ language / predefined/ The UnitEnum interface

The UnitEnum interface

The UnitEnum interface is automatically applied to all enumerations by the engine. It may not be implemented by user-defined classes. Enumerations may not override its methods, as default implementations are provided by the engine. It is available only for type checks.

Intro

The UnitEnum interface is automatically applied to all enumerations by the engine. It may not be implemented by user-defined classes. Enumerations may not override its methods, as default implementations are provided by the engine. It is available only for type checks.

Interfacesynopsis

implements UnitEnum { }

Cases

In this section

Source: language/predefined/unitenum.xml · from the official PHP manual (php/doc-en)