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

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

paillechat/php-enum
===================

Enum implementation for PHP 7

2.1(7y ago)1657.6k↓44.2%38MITPHPPHP &gt;=7.1

Since Apr 5Pushed 7y ago5 watchersCompare

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

READMEChangelog (6)Dependencies (3)Versions (11)Used By (8)

Enum
====

[](#enum)

[![Build Status](https://camo.githubusercontent.com/1a9bc6205c2368b6c3a10355f14d5a247d3f05665f5e84d53e48856c7bb7dabd/68747470733a2f2f7472617669732d63692e6f72672f7061696c6c65636861742f7068702d656e756d2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/paillechat/php-enum)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/ee9a7564237b4f02bb9d5190a789244a01499bb1d69d8b8e529ad099d8e2cfad/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7061696c6c65636861742f7068702d656e756d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/paillechat/php-enum/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/a5761c1f2b0aeff26d10103d3eb7b288ded175e1ca76d39b3b108370bc73d9ac/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7061696c6c65636861742f7068702d656e756d2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/paillechat/php-enum/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/fdff2c3a70e51959c4cce63c380e8815d134e37184ea64fe63455e815459de13/68747470733a2f2f706f7365722e707567782e6f72672f7061696c6c65636861742f7068702d656e756d2f76657273696f6e2e706e67)](https://packagist.org/packages/paillechat/php-enum)[![Total Downloads](https://camo.githubusercontent.com/f37854a4bdc7c985f48c6253e6317dd97a6817c31ed9ced67474c3072d833108/68747470733a2f2f706f7365722e707567782e6f72672f7061696c6c65636861742f7068702d656e756d2f646f776e6c6f6164732e706e67)](https://packagist.org/packages/paillechat/php-enum)

A PHP 7+ enumeration library.

Why?
----

[](#why)

To create perfect enums for PHP library

Installation
------------

[](#installation)

```
composer require "paillechat/php-enum:^2.0"

```

Usage
-----

[](#usage)

Declare enum class by extending basic `Enum` and filling it with constants. Constant value does not matter. You can fill it with any payload you can utilize as general constant, but we suggest you to keep constants as `protected` as possible

```
