PHPackages                             featuretoggle/lib-php - 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. featuretoggle/lib-php

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

featuretoggle/lib-php
=====================

PHP Library to use Feature Toggle services

v1.0.1(9y ago)019MITPHPPHP &gt;=5.5.0

Since Sep 11Pushed 9y ago1 watchersCompare

[ Source](https://github.com/feature-toggle/lib-php)[ Packagist](https://packagist.org/packages/featuretoggle/lib-php)[ Docs](https://github.com/feature-toggle/lib-php)[ RSS](/packages/featuretoggle-lib-php/feed)WikiDiscussions github Synced 3w ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Feature Toggle
==============

[](#feature-toggle)

A PHP client library for interacting with [featuretoggle.com](https://featuretoggle.com). This library is under active development and is likely to change frequently. Bug reports and pull requests are welcome.

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

[](#installation)

Install with [Composer](https://getcomposer.org/)

```
php composer.phar require featuretoggle/lib-php
```

Usage
-----

[](#usage)

```
require 'vendor/autoload.php';

// Create a new FTClient with your customer and environment API key's
$featuretoggle = new FeatureToggle\FTClient('customerKey', 'environmentKey', array('options'));

// Get features
$features = $featuretoggle->getFeatures();

// Check feature status
$enabled = $featuretoggle->isEnabled('feature_key');
if($enabled) {
    // Feature is enabled, do something
}
else {
    // Feature is disabled, do something else
}
```

### Configuration Options

[](#configuration-options)

The library caches responses from received the Feature Toggle API locally to limit the number of requests. The default cache timeout is 300 seconds (5 minutes). You can adjust the cache timeout by providing the 'cache\_timeout' config option when initializing the library.

```
array(
    'cache_timeout' => SECONDS, // optional, defaults to 300 seconds
)
```

Contributing
------------

[](#contributing)

Bug reports and pull requests are welcome on GitHub at .

License
-------

[](#license)

The library is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Every ~0 days

Total

2

Last Release

3571d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/05d3e634e3efc4ff8cc715eef7dbf604a978187591b47317bfaf4a674cb4ea9d?d=identicon)[presencenet](/maintainers/presencenet)

---

Top Contributors

[![faribauc](https://avatars.githubusercontent.com/u/6706673?v=4)](https://github.com/faribauc "faribauc (14 commits)")

---

Tags

clientfeaturefeature toggletogglefeature flagfeaturetogglefeaturetoggle php

### Embed Badge

![Health badge](/badges/featuretoggle-lib-php/health.svg)

```
[![Health](https://phpackages.com/badges/featuretoggle-lib-php/health.svg)](https://phpackages.com/packages/featuretoggle-lib-php)
```

###  Alternatives

[flagception/flagception-bundle

Feature toggle bundle on steroids.

294.0M](/packages/flagception-flagception-bundle)[opensoft/rollout

Feature switches or flags for PHP

2571.9M5](/packages/opensoft-rollout)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

232.5k](/packages/eslazarev-wildberries-sdk)

PHPackages © 2026

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