PHPackages                             marc-mabe/enum-cl - 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. marc-mabe/enum-cl

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

marc-mabe/enum-cl
=================

Compatibility layer for emulating enumerations in PHP &lt; 8.1 and native enumerations in PHP &gt;= 8.1

v1.0.0(4y ago)76.0k—4.5%1[1 PRs](https://github.com/marc-mabe/php-enum-cl/pulls)BSD-3-ClausePHPPHP ^7.1 | ^8.0CI failing

Since Aug 15Pushed 3mo ago2 watchersCompare

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

READMEChangelog (5)Dependencies (4)Versions (7)Used By (0)

Compatibility layer for emulating enumerations in PHP &lt; 8.1 but native enumerations in PHP &gt;= 8.1
=======================================================================================================

[](#compatibility-layer-for-emulating-enumerations-in-php--81-but-native-enumerations-in-php--81)

[![Build Status](https://github.com/marc-mabe/php-enum-cl/workflows/Test/badge.svg?branch=main)](https://github.com/marc-mabe/php-enum-cl/actions?query=workflow%3ATest%20branch%3Amain)[![Code Coverage](https://camo.githubusercontent.com/a61f81cdd7cc01218d49ddd49b7e3f2e5dd5c0dab246199726ba337fe71d44e3/68747470733a2f2f636f6465636f762e696f2f6769746875622f6d6172632d6d6162652f7068702d656e756d2d636c2f636f7665726167652e7376673f6272616e63683d6d61696e)](https://codecov.io/gh/marc-mabe/php-enum-cl/branch/main/)

How-to create
-------------

[](#how-to-create)

**Vendor\\MyEnum.php**

```
