PHPackages                             deseretdigital/knobby - 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. deseretdigital/knobby

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

deseretdigital/knobby
=====================

Manage knobs and levers for feature control

1.0.0(11y ago)6274.8k↓33.3%4[1 PRs](https://github.com/deseretdigital/knobby/pulls)MITPHP

Since Mar 13Pushed 1y ago18 watchersCompare

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

READMEChangelog (2)Dependencies (5)Versions (4)Used By (0)

[![Build Status](https://camo.githubusercontent.com/c93bf68b11fca4a06003407d8d03360bc3671984c8cdc14aa4b3a59587a3842f/68747470733a2f2f7472617669732d63692e6f72672f646573657265746469676974616c2f6b6e6f6262792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/deseretdigital/knobby)

knobby
======

[](#knobby)

Provides SDK for using feature flags.

Flag Types
----------

[](#flag-types)

### Levers

[](#levers)

A flag that passes its test if it's turned on.

```
include('./vendor/autoload.php');

$config = array(
    array(
        'name' => 'exampleOn',
        'on' => true,
        'type' => 'lever',
    ),
    array(
        'name' => 'exampleOff',
        'on' => false,
        'type' => 'lever',
    ),
);

$knobby = new \DDM\Knobby\Knobby();
$knobby->loadConfigArray($config);

if ($knobby->test('exampleOn')) {
    /*
    feature code here will run as the lever is on
    */
}

if ($knobby->test('exampleOff')) {
    /*
    feature code here will not run as the lever is off
    */
}
```

### Knobs

[](#knobs)

A flag that passes its test if a test value is below the knob's value.

```
include('./vendor/autoload.php');

$config = array(
    array(
        'name' => 'testKnob',
        'type' => 'knob',
        'value' => 15,
    ),
);

$knobby = new \DDM\Knobby\Knobby($config);

$userValue = 20;
if ($knobby->test('testKnob', $userValue)) {
    /*
    feature code here will not run, since the
    user value is greater than the allowed value
    */
}
```

Knobs can also be used to randomly generate a test value within a specified range and then test this random value against the knob's value.

```
include('./vendor/autoload.php');

$config = array(
    array(
        'name' => 'testKnob',
        'type' => 'knob',
        'min' => '10',
        'max' => '50',
        'value' => 15,
    ),
);

$knobby = new \DDM\Knobby\Knobby($config);

if ($knobby->test('testKnob')) {
    /*
    feature code here may or may not run depending on the value of the randomly
    generated test value between 10 and 50.
    */
}
```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~365 days

Total

2

Last Release

4076d ago

Major Versions

v0.1 → 1.0.02015-03-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/861f8dd8d5c7e74b976a7af98ae6cfe6bcdbb01494d5812a6956c91e82b5bb9e?d=identicon)[JustinCarmony](/maintainers/JustinCarmony)

---

Top Contributors

[![JustinCarmony](https://avatars.githubusercontent.com/u/602176?v=4)](https://github.com/JustinCarmony "JustinCarmony (12 commits)")[![hhatfield](https://avatars.githubusercontent.com/u/179744?v=4)](https://github.com/hhatfield "hhatfield (8 commits)")[![rsahlstrom](https://avatars.githubusercontent.com/u/677780?v=4)](https://github.com/rsahlstrom "rsahlstrom (4 commits)")[![IanKnighton](https://avatars.githubusercontent.com/u/46321154?v=4)](https://github.com/IanKnighton "IanKnighton (2 commits)")[![evilpeno](https://avatars.githubusercontent.com/u/672245?v=4)](https://github.com/evilpeno "evilpeno (2 commits)")[![morksmail](https://avatars.githubusercontent.com/u/1885121?v=4)](https://github.com/morksmail "morksmail (1 commits)")[![formigone](https://avatars.githubusercontent.com/u/852234?v=4)](https://github.com/formigone "formigone (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/deseretdigital-knobby/health.svg)

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

###  Alternatives

[yurunsoft/swoole-co-pool

26388.0k1](/packages/yurunsoft-swoole-co-pool)[burdamagazinorg/thunder-project

Project template for Thunder projects with composer

2727.1k](/packages/burdamagazinorg-thunder-project)

PHPackages © 2026

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