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

The BackedEnum interface

The BackedEnum interface is automatically applied to backed 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 BackedEnum interface is automatically applied to backed 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 BackedEnum extends UnitEnum { }

From Tryfrom

In this section

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