PHPackages                             karkowg/bit-flag - 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. karkowg/bit-flag

Abandoned → [gksh/bitmask](/?search=gksh%2Fbitmask)ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

karkowg/bit-flag
================

Minimal BitFlag value object for PHP

v1.1.1(4y ago)0281MITPHPPHP ^7.4

Since Apr 22Pushed 4y ago1 watchersCompare

[ Source](https://github.com/karkowg/bit-flag)[ Packagist](https://packagist.org/packages/karkowg/bit-flag)[ GitHub Sponsors](https://github.com/karkowg)[ RSS](/packages/karkowg-bit-flag/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (5)Used By (1)

 [![BitFlag code snippet](https://raw.githubusercontent.com/karkowg/bit-flag/main/docs/snippet.png)](https://raw.githubusercontent.com/karkowg/bit-flag/main/docs/snippet.png)

PHP BitFlag
===========

[](#php-bitflag)

[![Latest Version on Packagist](https://camo.githubusercontent.com/0e9324b946d060e0ced08d686fc7f6bcc0aaf76484e4ba8ce22f6c41b2c238d2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b61726b6f77672f6269742d666c61672e737667)](https://packagist.org/packages/karkowg/bit-flag)[![GitHub Tests Action Status](https://camo.githubusercontent.com/176405280c8f2cba585e78e058153f2c958c00cf52b8f2ccef76465c97a191ed/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6b61726b6f77672f6269742d666c61672f54657374732f6d61696e3f6c6162656c3d7465737473)](https://github.com/karkowg/bit-flag/actions?query=workflow%3Atests+branch%3Amain)[![License](https://camo.githubusercontent.com/8fc41496538518eaca76e6658b1333cdf37ff669bb0d20281fc8b9c085dd4df3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6b61726b6f77672f6269742d666c61672e737667)](https://github.com/karkowg/bit-flag/blob/main/LICENSE.md)[![Total Downloads](https://camo.githubusercontent.com/6c51dd7a3d14c6ca067913e5b90c97856018ca6d87b811a68a8b65b4cabd2858/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b61726b6f77672f6269742d666c61672e737667)](https://packagist.org/packages/karkowg/bit-flag)

---

This package provides a minimal BitFlag value object class for PHP.

> **Requires [PHP 7.4](https://php.net/releases/)**

⚡️ Installation

```
composer require karkowg/bit-flag
```

🧹 Keep a modern codebase with **PHP CS Fixer**:

```
composer lint
```

⚗️ Run static analysis using **PHPStan**:

```
composer test:types
```

✅ Run unit tests using **PEST**

```
composer test:unit
```

🚀 Run the entire test suite:

```
composer test
```

Package was created using **[Skeleton PHP](https://github.com/nunomaduro/skeleton-php)** by **[Nuno Maduro](https://twitter.com/enunomaduro)** under the **[MIT license](https://opensource.org/licenses/MIT)**.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.3% 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 ~1 days

Total

4

Last Release

1475d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d1a8ad2e8cad0e133fd62d56397d613fc11abcf9482502d402f2696b45a079d8?d=identicon)[karkowg](/maintainers/karkowg)

---

Top Contributors

[![nunomaduro](https://avatars.githubusercontent.com/u/5457236?v=4)](https://github.com/nunomaduro "nunomaduro (43 commits)")[![karkowg](https://avatars.githubusercontent.com/u/14905932?v=4)](https://github.com/karkowg "karkowg (7 commits)")[![svenluijten](https://avatars.githubusercontent.com/u/11269635?v=4)](https://github.com/svenluijten "svenluijten (1 commits)")

---

Tags

bit-flagbitflagbitflagsphpphpbitflagbit-flag

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/karkowg-bit-flag/health.svg)

```
[![Health](https://phpackages.com/badges/karkowg-bit-flag/health.svg)](https://phpackages.com/packages/karkowg-bit-flag)
```

###  Alternatives

[imanghafoori/laravel-anypass

A minimal yet powerful package to help you in development.

21421.6k](/packages/imanghafoori-laravel-anypass)

PHPackages © 2026

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