PHPackages                             goldspecdigital/phpenum - 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. goldspecdigital/phpenum

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

goldspecdigital/phpenum
=======================

A useful enum wrapper.

v1.0.3(8y ago)050.9k↑275%MITPHPPHP &gt;=7.0

Since Oct 6Pushed 8y ago1 watchersCompare

[ Source](https://github.com/goldspecdigital/phpenum)[ Packagist](https://packagist.org/packages/goldspecdigital/phpenum)[ Docs](https://github.com/goldspecdigital/phpenum)[ RSS](/packages/goldspecdigital-phpenum/feed)WikiDiscussions 1.0 Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (6)Used By (0)

PHP Enum Wrapper
================

[](#php-enum-wrapper)

[![Build Status](https://camo.githubusercontent.com/8766194188e447c2e3d641534c207311d85c505983d7221e86f3d205b6ba210f/68747470733a2f2f7472617669732d63692e6f72672f676f6c64737065636469676974616c2f706870656e756d2e7376673f6272616e63683d312e30)](https://travis-ci.org/goldspecdigital/phpenum)

A useful class which can be extended to give enum-like features to your code. Is intended to be used when modeling the MySQL enum type.

Features
--------

[](#features)

- Get an array of all the enum keys and values.
- Check if the enum contains a value.
- Check if the enum has a key.
- Easy to use, simply extend the Enum class.

Installation
------------

[](#installation)

Simply run: `composer require goldspecdigital/phpenum "~1.0"`

Contributing
------------

[](#contributing)

Anyone can contribute to this simple project. Simply submit a pull request at the [goldspecdigital/phpenum](https://github.com/goldspecdigital/phpenum) repository.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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

Every ~26 days

Total

5

Last Release

3041d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/938193490dee7bff7e71bbf41eba0af6f0a57437212674640e5b637de880e0d3?d=identicon)[goldspecdigital](/maintainers/goldspecdigital)

---

Top Contributors

[![matthew-inamdar](https://avatars.githubusercontent.com/u/13454566?v=4)](https://github.com/matthew-inamdar "matthew-inamdar (15 commits)")

---

Tags

enum

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/goldspecdigital-phpenum/health.svg)

```
[![Health](https://phpackages.com/badges/goldspecdigital-phpenum/health.svg)](https://phpackages.com/packages/goldspecdigital-phpenum)
```

###  Alternatives

[myclabs/php-enum

PHP Enum implementation

2.7k227.9M637](/packages/myclabs-php-enum)[dasprid/enum

PHP 7.1 enum implementation

382146.0M11](/packages/dasprid-enum)[spatie/enum

PHP Enums

84529.1M68](/packages/spatie-enum)[marc-mabe/php-enum

Simple and fast implementation of enumerations with native PHP

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

Laravel Enum support

3655.4M31](/packages/spatie-laravel-enum)[consistence/consistence

Consistence - consistent approach and additions to PHP's functionality

1831.1M18](/packages/consistence-consistence)

PHPackages © 2026

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