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

ActiveLibrary

netsilik/enum
=============

Strict Enumeration class.

2.1.0(3y ago)01.6k1[1 PRs](https://github.com/Netsilik/Enum/pulls)1MITPHPPHP ^8.1

Since Oct 27Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Netsilik/Enum)[ Packagist](https://packagist.org/packages/netsilik/enum)[ Docs](https://gitlab.com/Netsilik/Enum)[ RSS](/packages/netsilik-enum/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (6)Used By (1)

Enum
====

[](#enum)

Strict Enumeration class.

---

MIT Licence

Unless required by applicable law or agreed to in writing, software distributed under the Licence is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

Contact:
Latest version available at:

---

Example of usage

```
// Object creation
final class Species extends Enum {
    protected $enum = array('human','monkey','alien');
}

// Use Enum
function checkSpecies(Species $enum) {
    return ($enum  'alien') ? 'Hello' : 'Waaah!';
}
checkSpecies(new Species('monkey')); // returns 'Hello'

// Use Enum with invalid value
function checkSpecies(Species $enum) {
    return ($enum  'alien') ? 'Hello' : 'Waaah!';
}
checkSpecies(new Species('lion')); // triggers Fatal Error: 'Provided value is not part of this enumerated list'

```

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

[](#installation)

```
composer require netsilik/enum

```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~368 days

Total

5

Last Release

1282d ago

PHP version history (2 changes)2.0.0PHP ^5.5.0 || ^7.0

2.1.0PHP ^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/90d507c4b8102af88517672375ad0777056f35baecaf2ea94dbc7b7c2e7c5512?d=identicon)[Jacco-V](/maintainers/Jacco-V)

---

Top Contributors

[![Jacco-V](https://avatars.githubusercontent.com/u/19333579?v=4)](https://github.com/Jacco-V "Jacco-V (7 commits)")

---

Tags

enumenumaration

### Embed Badge

![Health badge](/badges/netsilik-enum/health.svg)

```
[![Health](https://phpackages.com/badges/netsilik-enum/health.svg)](https://phpackages.com/packages/netsilik-enum)
```

###  Alternatives

[myclabs/php-enum

PHP Enum implementation

2.7k227.9M637](/packages/myclabs-php-enum)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[dasprid/enum

PHP 7.1 enum implementation

379146.0M11](/packages/dasprid-enum)[spatie/enum

PHP Enums

84429.1M68](/packages/spatie-enum)[marc-mabe/php-enum

Simple and fast implementation of enumerations with native PHP

49444.8M97](/packages/marc-mabe-php-enum)[fresh/doctrine-enum-bundle

Provides support of ENUM type for Doctrine2 in Symfony applications.

4636.8M12](/packages/fresh-doctrine-enum-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
