More Attribute Usage

no-email (Damien Seguy), Damien Seguy
Fri, 10 Nov 2023 00:00:00 +0000

PHP attributes are for classes, but also for enums, traits and interfaces. With ::TARGET_CLASS.
PHP attributes are for functions, and also for closures and arrow functions (but not for methods). With ::TARGET_FUNCTION.

Beware of the position of the attribute with closures and arrow functions, though.