PHPackages                             joaorbrandao/phenum - 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. joaorbrandao/phenum

ActiveLibrary

joaorbrandao/phenum
===================

PHP enums made easy.

v0.1.0(5y ago)011MITPHPPHP &gt;=7.4

Since Dec 27Pushed 5y ago1 watchersCompare

[ Source](https://github.com/joaorbrandao/phenum)[ Packagist](https://packagist.org/packages/joaorbrandao/phenum)[ Docs](https://github.com/joaorbrandao/phenum)[ RSS](/packages/joaorbrandao-phenum/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

PHENUM
======

[](#phenum)

This package creates a simple way of creating PHP enums (one more!). Your IDE will detect them without using DocBlocks. In the end, it's all about PHP constants!

Installing
----------

[](#installing)

```
composer require joaorbrandao/phenum
```

Usage
-----

[](#usage)

### Create an Enum

[](#create-an-enum)

1. Create a class.
2. Extend the `Enum` class.
3. Use the `Enumerable` trait.
4. Define PHP constants as needed.

```
