PHPackages                             crussell52/php-enum - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. crussell52/php-enum

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

crussell52/php-enum
===================

PHP Enums inspired by Java Enums

v0.1(10y ago)539.1k↑100%2MITPHPPHP &gt;=5.5.0

Since Mar 10Pushed 9y ago3 watchersCompare

[ Source](https://github.com/crussell52/php-enum)[ Packagist](https://packagist.org/packages/crussell52/php-enum)[ Docs](https://github.com/crussell52/php-enum)[ RSS](/packages/crussell52-php-enum/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (3)Used By (0)

php-enum
========

[](#php-enum)

This project is an Enumeration implementation for PHP &gt;= 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](https://github.com/crussell52/php-enum/wiki/Description) and [Usage](https://github.com/crussell52/php-enum/wiki/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!)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity34

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3721d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/636ac9c56711671ecd63e78b25a32d2c3e37fb4e8340130fb5140c81cff78cff?d=identicon)[crussell52](/maintainers/crussell52)

---

Top Contributors

[![crussell52](https://avatars.githubusercontent.com/u/375294?v=4)](https://github.com/crussell52 "crussell52 (25 commits)")

---

Tags

enumenumeration

### Embed Badge

![Health badge](/badges/crussell52-php-enum/health.svg)

```
[![Health](https://phpackages.com/badges/crussell52-php-enum/health.svg)](https://phpackages.com/packages/crussell52-php-enum)
```

###  Alternatives

[marc-mabe/php-enum

Simple and fast implementation of enumerations with native PHP

49644.8M97](/packages/marc-mabe-php-enum)[cerbero/enum

Zero-dependencies package to supercharge enum functionalities.

359207.5k2](/packages/cerbero-enum)[cerbero/laravel-enum

Laravel package to supercharge enum functionalities.

18989.6k](/packages/cerbero-laravel-enum)[emreyarligan/enum-concern

A PHP package for effortless Enumeration handling with Laravel Collections 📦 ✨

21156.3k1](/packages/emreyarligan-enum-concern)[rexlabs/enum

Enumeration (enum) implementation for PHP

48482.2k2](/packages/rexlabs-enum)[thunderer/platenum

PHP enum library

36145.7k](/packages/thunderer-platenum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
