PHP 8.1 RFC: Enumerations
RFC Vote: Enumerations
|Yes: 44No: 7|
An RFC to add Enumerations (Enums for short) to PHP.
Enums are enumerated types that has a fixed number of possible values. This RFC proposes to add an
enum_exists function, two new interfaces for int/string-backed enums, and unit enums.