enum
🎲 Zero-dependencies PHP library to supercharge enum functionalities. (by cerbero90)
php-enum
The enum PHP is missing, inspired from SplEnum (by myclabs)
enum | php-enum | |
---|---|---|
1 | 2 | |
189 | 2,717 | |
- | 0.3% | |
5.3 | 3.2 | |
almost 2 years ago | 4 months ago | |
PHP | PHP | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
enum
Posts with mentions or reviews of enum.
We have used some of these posts to build our list of alternatives
and similar projects.
-
Supercharge your enum functionalities
If you use enums in your app and want to supercharge their functionalities, you may want to check out github.com/cerbero90/enum, a toolkit that aims to make your journey with enums easier and more enjoyable.
php-enum
Posts with mentions or reviews of php-enum.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-08-17.
-
Weekly "ask anything" thread
My understanding of the new PHP enums are that they provide a first-class citizen for enum patterns in userland that are extremely common. For example, there is a popular enum library https://github.com/myclabs/php-enum. But many people craft these by hand in their projects. The main idea is to provide an abstraction over "strings that inform business logic" for lack of a better term.
-
My opinion on the PHP 8.1 Enum RFC
This feature alone would likely cause me to drop myclabs/php-enum as my enum implementation.
What are some alternatives?
When comparing enum and php-enum you can also consider the following projects:
enum-concern - A PHP package for effortless Enumeration handling with Laravel Collections 📦 ✨
php-enum - Simple and fast implementation of enumerations with native PHP
laravel-enum - Simple, extensible and powerful enumeration implementation for Laravel.
enum - Strongly typed enums in PHP supporting autocompletion and refactoring
attributary - A library for PHP 8 Attribute developers. This library gives developers a similar experience to the Doctrine/Annotation library.