PHPackages                             thunderer/platenum - 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. thunderer/platenum

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

thunderer/platenum
==================

PHP enum library

v0.4.0(2y ago)36145.7k↓18.2%2MITPHPPHP ^7.1|^8.0CI failing

Since Sep 25Pushed 1y ago5 watchersCompare

[ Source](https://github.com/thunderer/Platenum)[ Packagist](https://packagist.org/packages/thunderer/platenum)[ RSS](/packages/thunderer-platenum/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (5)Versions (9)Used By (0)

Platenum
========

[](#platenum)

[![Build](https://github.com/thunderer/Platenum/actions/workflows/test.yaml/badge.svg)](https://github.com/thunderer/Platenum/actions/workflows/test.yaml/badge.svg)[![Latest Stable Version](https://camo.githubusercontent.com/215fc35d6c8b232d86899f6e84a4ad6dad7f3321a116f245c566d0f16bc12c38/68747470733a2f2f706f7365722e707567782e6f72672f7468756e64657265722f706c6174656e756d2f762f737461626c652e737667)](https://packagist.org/packages/thunderer/platenum)[![Total Downloads](https://camo.githubusercontent.com/17537062f7fd7a8f8d87608b7b154ceb21dc473180d20712d1a9480cac06e553/68747470733a2f2f706f7365722e707567782e6f72672f7468756e64657265722f706c6174656e756d2f646f776e6c6f616473)](https://packagist.org/packages/thunderer/platenum)[![Psalm coverage](https://camo.githubusercontent.com/0872402368a538af1bc61f3bd6df17a43ac442b3cae21ab83aa1437bfa4e079a/68747470733a2f2f73686570686572642e6465762f6769746875622f7468756e64657265722f506c6174656e756d2f636f7665726167652e7376673f)](https://shepherd.dev/github/thunderer/Platenum)[![Code Coverage](https://camo.githubusercontent.com/00a0f10ac6aba78aea707a299d60e4ac3e91e6c3309933f3e8141f7f37716610/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7468756e64657265722f506c6174656e756d2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/thunderer/Platenum/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/6336b1597107734a8dd270d824660174b2de5f1dc1b37b4d2029b499ca6d4af8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7468756e64657265722f506c6174656e756d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/thunderer/Platenum/?branch=master)[![License](https://camo.githubusercontent.com/6120651088b0f022df0bffa528055ce4cdce34222b04353eaa19665198c4804a/68747470733a2f2f706f7365722e707567782e6f72672f7468756e64657265722f706c6174656e756d2f6c6963656e73652e737667)](https://packagist.org/packages/thunderer/platenum)

Platenum provides a flexible and feature-complete solution for [enumerations (enums)](https://en.wikipedia.org/wiki/Enumerated_type) in PHP with no external dependencies. The name comes from the Latin term for a [Platinum](https://en.wikipedia.org/wiki/Platinum) chemical element.

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

[](#installation)

This library is available on Packagist and can be installed with Composer in projects supporting PHP 7.1 and above:

```
composer require thunderer/platenum

```

Usage
-----

[](#usage)

Create a new class with members definition:

```
