PHP Enumerations, or "PHP enums" for short, is one of the most anticipated
new features of PHP 8.1 (released on November 25, 2021). Their most common use
case is to group several related values. In previous PHP versions you had to
define a series of related constants to achieve that. In PHP 8.1 you can do this: