One less hidden bug with Enum PHP 8.1 provides now enumerations, a.k.a. enums, as a native PHP construct. They provide a custom type with a limited set of values. Enumerations have been around in PHP in various forms, for a long time : check bensampo/laravel-enum, spatie/enum, marc-mabe/php-enum, eloquent/enumeration or even any framework (CakePHP-enums). Before that, […]