PHPackages                             gollumsf/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. gollumsf/enum

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

gollumsf/enum
=============

An implementation of enum for PHP. Java like type

v2.0.4(3y ago)13.3k2MITPHPPHP &gt;=7.1CI failing

Since Oct 5Pushed 3y ago1 watchersCompare

[ Source](https://github.com/GollumSF/enum)[ Packagist](https://packagist.org/packages/gollumsf/enum)[ Docs](https://github.com/GollumSF/enum)[ RSS](/packages/gollumsf-enum/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (7)Dependencies (1)Versions (8)Used By (2)

Enum
====

[](#enum)

[![Build Status](https://github.com/GollumSF/enum/actions/workflows/php_7.1.yml/badge.svg?branch=master)](https://github.com/GollumSF/enum/actions)[![Build Status](https://github.com/GollumSF/enum/actions/workflows/php_7.2.yml/badge.svg?branch=master)](https://github.com/GollumSF/enum/actions)[![Build Status](https://github.com/GollumSF/enum/actions/workflows/php_7.3.yml/badge.svg?branch=master)](https://github.com/GollumSF/enum/actions)[![Build Status](https://github.com/GollumSF/enum/actions/workflows/php_7.4.yml/badge.svg?branch=master)](https://github.com/GollumSF/enum/actions)[![Build Status](https://github.com/GollumSF/enum/actions/workflows/php_8.0.yml/badge.svg?branch=master)](https://github.com/GollumSF/enum/actions)[![Build Status](https://github.com/GollumSF/enum/actions/workflows/php_8.1.yml/badge.svg?branch=master)](https://github.com/GollumSF/enum/actions)

[![Coverage](https://camo.githubusercontent.com/4eb3cd4ee097cd690020652f302203624538cea2c54a160218fce7f0c34aaf93/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f476f6c6c756d53462f656e756d2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/GollumSF/enum)[![License](https://camo.githubusercontent.com/b7de8b0722f0a625757d5b991ce67ab0b38440fde3aac436671742d12dd43d54/68747470733a2f2f706f7365722e707567782e6f72672f676f6c6c756d73662f656e756d2f6c6963656e7365)](https://packagist.org/packages/gollumsf/enum)[![Latest Stable Version](https://camo.githubusercontent.com/4373aaefb7ff114a45210843f38378a08b93d25fc5ca5cebb90e0a9c095e168b/68747470733a2f2f706f7365722e707567782e6f72672f676f6c6c756d73662f656e756d2f762f737461626c65)](https://packagist.org/packages/gollumsf/enum)[![Latest Unstable Version](https://camo.githubusercontent.com/d23c99313c8006da31f573fcd07775c6d8fe8b436a6b3e4cc1edd54fedf0c259/68747470733a2f2f706f7365722e707567782e6f72672f676f6c6c756d73662f656e756d2f762f756e737461626c65)](https://packagist.org/packages/gollumsf/enum)[![Discord](https://camo.githubusercontent.com/e2ea9d7fb91494f17c7c76925e006e2ad2d7586fa54f500364bddda1520eecb1/68747470733a2f2f696d672e736869656c64732e696f2f646973636f72642f3637313734313934343134393537333638373f636f6c6f723d707572706c65266c6162656c3d646973636f7264)](https://discord.gg/xMBc5SQ)

Simple classe, trait and interface for implement enum in PHP

Installation:
-------------

[](#installation)

```
composer require gollumsf/enum
```

Usages:
-------

[](#usages)

### Basic:

[](#basic)

```
