crussell52 / php-enum
PHP Enums inspired by Java Enums
Installs: 29 866
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 4
Forks: 3
Open Issues: 0
Requires
- php: >=5.5.0
This package is not auto-updated.
Last update: 2024-04-13 15:34:01 UTC
README
This project is an Enumeration implementation for PHP >= 5.5 which is based on the concepts behind the Java Enum data type.
Normally, I don't try to force one language's constructs into a different language. However, in my time with Java I have grown to appreciate their Enum data type. I believe the functionality offered is significant enough to warrant a php implementation.
Check out the full Project Description and Usage on the Wiki!
I've also included an example file which will demostrate the primary features of php-enum. (Just make sure you modify the path to the trait at the top of the file!)