Enum Are Not Linted

../_images/enum_are_not_linted.png

It is possible to give two identical values to different enumeration cases, but not to execute it.

In PHP 8.1, duplicate case values generated a compilation error.

Since PHP 8.2, it is now waiting for the execution stage and the first usage of the enumeration, to raise a fatal error.

See Also

PHP Error Messages

PHP Features