PHPackages                             ducks-project/polyfill-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. ducks-project/polyfill-enum

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

ducks-project/polyfill-enum
===========================

Polyfill for PHP enumerations interface.

1.x-dev(1y ago)113MITPHPPHP &gt;=7.4

Since Sep 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ducks-project/polyfill-enum)[ Packagist](https://packagist.org/packages/ducks-project/polyfill-enum)[ Docs](https://github.com/ducks-project/polyfill-enum/)[ RSS](/packages/ducks-project-polyfill-enum/feed)WikiDiscussions 1.x Synced 1mo ago

READMEChangelogDependencies (1)Versions (1)Used By (0)

polyfill-enum
=============

[](#polyfill-enum)

[![License](https://camo.githubusercontent.com/91d4416da6c702947fc6aeec3b31b24e3dac32055bec73b65b30a47f7786a5d1/68747470733a2f2f706f7365722e707567782e6f72672f6475636b732d70726f6a6563742f706f6c7966696c6c2d656e756d2f6c6963656e7365)](https://packagist.org/packages/ducks-project/polyfill-enum)[![Latest Stable Version](https://camo.githubusercontent.com/e72add40b8dec1a371f28dcce01ef33f8946b9b14b7488c27e22a7b6291c720a/68747470733a2f2f706f7365722e707567782e6f72672f6475636b732d70726f6a6563742f706f6c7966696c6c2d656e756d2f762f737461626c65)](https://packagist.org/packages/ducks-project/polyfill-enum)[![PHP Version Require](https://camo.githubusercontent.com/b83481e73b3799ff1daea2aef78493f9aaf5aeb885563162f318993c78ea7ede/68747470733a2f2f706f7365722e707567782e6f72672f6475636b732d70726f6a6563742f706f6c7966696c6c2d656e756d2f726571756972652f706870)](https://packagist.org/packages/ducks-project/polyfill-enum)

[![Total Downloads](https://camo.githubusercontent.com/e2b1ae9c08eb98ed68b198c97d8f1138ecaf7aa15b2dcf5a5690a7d1063c7622/68747470733a2f2f706f7365722e707567782e6f72672f6475636b732d70726f6a6563742f706f6c7966696c6c2d656e756d2f646f776e6c6f616473)](https://packagist.org/packages/ducks-project/polyfill-enum)[![Monthly Downloads](https://camo.githubusercontent.com/df7c559cc61d30de910ff9735b95cb0d1350cde62535dab87b7e10eb25e87d65/68747470733a2f2f706f7365722e707567782e6f72672f6475636b732d70726f6a6563742f706f6c7966696c6c2d656e756d2f642f6d6f6e74686c79)](https://packagist.org/packages/ducks-project/polyfill-enum)[![Daily Downloads](https://camo.githubusercontent.com/f7eb4a7b6be07ca014814956c615f8fa1e42512e90bb0b430c7c6f8e0ebd2c11/68747470733a2f2f706f7365722e707567782e6f72672f6475636b732d70726f6a6563742f706f6c7966696c6c2d656e756d2f642f6461696c79)](https://packagist.org/packages/ducks-project/polyfill-enum)

[![Duck's Validated](https://camo.githubusercontent.com/55cd39dc9426a431b51194b4c9c571b67530390634276beab8244297a0d7788d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6475636b2d76616c6964617465642d6c6967687479656c6c6f77)](https://opencollective.com/ducks-project)[![Packagist online](https://camo.githubusercontent.com/f23247436d9616bc9045be6056671e2d96dd152901e3f29d0a8c78f12d96028f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7061636b61676973742d6f6e6c696e652d627269676874677265656e)](https://opencollective.com/ducks-project)

[![Contributor Covenant](https://camo.githubusercontent.com/4ae39ae593b602cf0ae07972b61c73728b77ec8e2cf40f579a2441948208036b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f6e7472696275746f72253230436f76656e616e742d322e312d3462616161612e737667)](code_of_conduct.md)

- Project page:
- Repository:

Description
-----------

[](#description)

This component provides features added to PHP 8.1 core:

- [UnitEnum](./assets/documentation/UnitEnum.md#The-UnitEnum-interface)
- [BackedEnum](./assets/documentation/BackedEnum.md#The-BackedEnum-interface)

License
-------

[](#license)

This library is released under the [MIT license](LICENSE).

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 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

600d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0642cbb897484fb50a72d1c6f9e4ea6f53f776a3bfc0fdb36cd2b1536b0c1872?d=identicon)[donaldinou](/maintainers/donaldinou)

---

Top Contributors

[![donaldinou](https://avatars.githubusercontent.com/u/429269?v=4)](https://github.com/donaldinou "donaldinou (14 commits)")

---

Tags

polyfillphpenumenumeratorcompatunitEnumbackedEnumpooenum\_exists

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/ducks-project-polyfill-enum/health.svg)

```
[![Health](https://phpackages.com/badges/ducks-project-polyfill-enum/health.svg)](https://phpackages.com/packages/ducks-project-polyfill-enum)
```

###  Alternatives

[ducks-project/spl-types

Polyfill Module for SplType PHP extension. This extension aims at helping people making PHP a stronger typed language and can be a good alternative to scalar type hinting. It provides different typehandling classes as such as integer, float, bool, enum and string

1032.4k](/packages/ducks-project-spl-types)[php-ds/php-ds

Specialized data structures as alternatives to the PHP array

4108.8M134](/packages/php-ds-php-ds)[henzeb/enumhancer

Your framework-agnostic Swiss Army knife for PHP 8.1+ native enums

69287.4k2](/packages/henzeb-enumhancer)[phpxmlrpc/polyfill-xmlrpc

A pure-php reimplementation of the API exposed by the native XML-RPC extension

12369.8k2](/packages/phpxmlrpc-polyfill-xmlrpc)

PHPackages © 2026

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