Enumeration constants
Enumerations may include constants, which may be public, private, or protected, although in practice private and protected are equivalent as inheritance is not allowed.
An enum constant may refer to an enum case:
<?php enum Size { case Small; case Medium; case Large; public const Huge = self::Large; } ?>
© 1997–2021 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/language.enumerations.constants.php