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

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

oskarstark/enum-helper
======================

This library provides helpers for several enum operations

1.8.4(3mo ago)132.9M↓12.2%3[1 issues](https://github.com/OskarStark/enum-helper/issues)12MITPHPPHP &gt;=8.1CI passing

Since Oct 17Pushed 5d ago3 watchersCompare

[ Source](https://github.com/OskarStark/enum-helper)[ Packagist](https://packagist.org/packages/oskarstark/enum-helper)[ RSS](/packages/oskarstark-enum-helper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (18)Used By (12)

enum-helper
===========

[](#enum-helper)

This library provides helpers for several enum operations:

- compare
- to array

It also provides an abstract `EnumTestCase`.

[![CI](https://github.com/OskarStark/enum-helper/workflows/CI/badge.svg?branch=main)](https://github.com/OskarStark/enum-helper/actions?query=workflow:ci+branch:main)

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

[](#installation)

```
composer require oskarstark/enum-helper

```

Usage
-----

[](#usage)

For example, you have the following Enum:

```
