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

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

morilog/php-enum
================

A Library for easy working with Enums in php programming language

1.0.1(6y ago)09.8k↑270%PHPPHP &gt;=7.1.0

Since Aug 14Pushed 6y ago1 watchersCompare

[ Source](https://github.com/morilog/php-enum)[ Packagist](https://packagist.org/packages/morilog/php-enum)[ RSS](/packages/morilog-php-enum/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

### PHP-ENUM

[](#php-enum)

There is not any `ENUM` in php programming language. BTW every programmer may need to this feature.

In this library i provide the simple and easy way for working with enums.

##### Installation

[](#installation)

Run bellow command:

```
composer require morilog/php-enum
```

#### Usage

[](#usage)

##### Writing new Enums

[](#writing-new-enums)

Create a class that extends the `\Morilog\PhpEnum\Enum` class

> Constants keys must be all UPPER\_CASE and separate words by `_` (underscore)

> Constants values can be all scalar values such as `string`, `integer`, `boolean`, etc.

```
