PHPackages                             fetzi/flipt-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. [API Development](/categories/api)
4. /
5. fetzi/flipt-php

ActiveLibrary[API Development](/categories/api)

fetzi/flipt-php
===============

A PHP package for integrating the Flipt REST API

v0.1.0(4y ago)2222[1 PRs](https://github.com/fetzi/flipt-php/pulls)MITPHPPHP ^7.4 || ^8.0

Since May 26Pushed 2y ago1 watchersCompare

[ Source](https://github.com/fetzi/flipt-php)[ Packagist](https://packagist.org/packages/fetzi/flipt-php)[ GitHub Sponsors](https://github.com/fetzi)[ RSS](/packages/fetzi-flipt-php/feed)WikiDiscussions main Synced 5d ago

READMEChangelog (1)Dependencies (14)Versions (2)Used By (0)

 [![GitHub Workflow Status (main)](https://camo.githubusercontent.com/30a8ab4d8e274c9c91fd7213c6820c51ca3d30c332a7c5e0afd8125822bbdc87/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6665747a692f666c6970742d7068702f54657374732f6d61696e)](https://github.com/fetzi/flipt-php/actions) [![Total Downloads](https://camo.githubusercontent.com/c642151cf2e53210bbf7017bdfe29b2038ce9608549b5512ee8e371309b5810f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6665747a692f666c6970742d706870)](https://packagist.org/packages/fetzi/flipt-php) [![License](https://camo.githubusercontent.com/64e5291bc91ab864af0ac6afaccade68e54eb362dcd533cfd5ae37480eb9b817/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6665747a692f666c6970742d706870)](https://packagist.org/packages/fetzi/flipt-php)

---

**flipt-php** is a small wrapper package for the Flipt REST API to be able to easily integrate Flipt into your PHP applications.

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

[](#installation)

```
composer require fetzi/flipt-php

```

Usage
-----

[](#usage)

The `Flipt` class uses [HTTPlug](http://httplug.io/) a HTTP Client abstraction to make the API requests. You have to pass a base URL to the static `create` function. Everything else (`HttpClient`, `RequestFactory` &amp; `StreamFactory`) is automatically determined.

```
$flipt = Flipt::create('http://localhost:8080');
```

By calling the `evaluate` method you can check if a certain user (entity) should get a certain feature or not. To perform a evaluation you need to create a `EvaluateRequest` that contains the data to evaluate.

```
$evaluateRequest = new EvaluateRequest('sample-flag', 'user-id', ['foo' => 'bar']);
$evaluateResponse = $flipt->evaluate($evaluateRequest);

if ($evaluateResponse->isMatch()) {
    // awesome new feature
} else {
    // old boring feature
}
```

### Variants

[](#variants)

To be able to determine which variant of a feature-flag should be displayed you need to use the `getVariant()` method on the response.

The `EvaluateResponse` also provides a variant that can be accessed via the `getValue()` or `getVariant()` method:

```
$evaluateRequest = new EvaluateRequest('sample-flag', 'user-id', ['foo' => 'bar']);
$evaluateResponse = $flipt->evaluate($evaluateRequest);

if ($evaluateResponse->isMatch()) {
    switch ($evaluateResponse->getVariant()) {
        case 'a':
            // show A variant
            break;
        case 'b':
            // show B variant
            break;
    }
}
```

**flipt-php** was created by **[Johannes Pichler](https://twitter.com/fetzi_io)** under the **[MIT license](https://opensource.org/licenses/MIT)**.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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

1814d ago

### Community

Maintainers

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

---

Top Contributors

[![fetzi](https://avatars.githubusercontent.com/u/3509426?v=4)](https://github.com/fetzi "fetzi (2 commits)")[![alignwebs](https://avatars.githubusercontent.com/u/7644807?v=4)](https://github.com/alignwebs "alignwebs (1 commits)")

---

Tags

phpfeature-flagsflipt

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/fetzi-flipt-php/health.svg)

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

###  Alternatives

[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k22.6M232](/packages/openai-php-client)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

963.1M35](/packages/getbrevo-brevo-php)[swisnl/json-api-client

A PHP package for mapping remote JSON:API resources to Eloquent like models and collections.

211473.2k12](/packages/swisnl-json-api-client)[brd6/notion-sdk-php

Notion SDK for PHP

5918.0k](/packages/brd6-notion-sdk-php)[wordpress/php-ai-client

A provider agnostic PHP AI client SDK to communicate with any generative AI models of various capabilities using a uniform API.

26236.6k14](/packages/wordpress-php-ai-client)

PHPackages © 2026

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