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

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

mitsuru793/bit
==============

Bit Class which is Value Object.

v0.0.1(6y ago)03[1 PRs](https://github.com/mitsuru793/php-bit/pulls)MITPHPPHP &gt;=7.4

Since Feb 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mitsuru793/php-bit)[ Packagist](https://packagist.org/packages/mitsuru793/bit)[ RSS](/packages/mitsuru793-bit/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (1)Dependencies (4)Versions (3)Used By (0)

[![Build Status](https://camo.githubusercontent.com/7408e71db5b1aa0797d870652cf5a66fdce6affe92f4f3249d6f081d677106fa/68747470733a2f2f7472617669732d63692e6f72672f6d6974737572753739332f7068702d6269742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mitsuru793/php-bit)

PHP Bit
=======

[](#php-bit)

```
// construct
$bit = new UnlimitedBit(2);
$bit = new UnlimitedBit('0010');

assert($bit->asInt() === 2);
assert($bit->asSTr() === '10');

// immutable
assert($bit->on(4)->asStr() === '1010');
assert($bit->asStr() === '10');

assert($bit->on(4)->off(2)->asStr() === '1000');
```

Both of the followings implement interface 'Bit'. Please see test codes and interface.

- UnlimitedBit
- LimitedBit

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2288d ago

### Community

Maintainers

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

---

Top Contributors

[![mitsuru793](https://avatars.githubusercontent.com/u/8012508?v=4)](https://github.com/mitsuru793 "mitsuru793 (33 commits)")

---

Tags

bit

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[zumba/swivel

Strategy driven feature toggles

209135.7k5](/packages/zumba-swivel)[yaroslavche/bitmask

BitMask, EnumBitMask

3453.7k1](/packages/yaroslavche-bitmask)

PHPackages © 2026

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