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

ActiveLibrary

brunojunior/simple-enum
=======================

Abstract class to simulate enum with label in PHP

v1.0(7y ago)1174MITPHPPHP &gt;=7.1.0

Since Aug 22Pushed 7y ago1 watchersCompare

[ Source](https://github.com/BrunoJunior/simple-enum)[ Packagist](https://packagist.org/packages/brunojunior/simple-enum)[ RSS](/packages/brunojunior-simple-enum/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

simple-enum
===========

[](#simple-enum)

Abstract class to simulate enum with label in PHP

How to install
--------------

[](#how-to-install)

```
composer require brunojunior/simple-enum
```

How to use
----------

[](#how-to-use)

You have to create a class which extends `SimpleEnum\Enum`.

### The simpliest enum

[](#the-simpliest-enum)

This enum will automatically generate labels thanks to the constants name. Here, you'll have those labels «First value», «Second value» and «Third value».

```
