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(5y 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 3w 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 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity47

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

1863d 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

[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35789.4k2](/packages/telnyx-telnyx-php)[openai-php/client

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

5.8k28.0M309](/packages/openai-php-client)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M729](/packages/sylius-sylius)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

1003.9M49](/packages/getbrevo-brevo-php)[brd6/notion-sdk-php

Notion SDK for PHP

6123.0k](/packages/brd6-notion-sdk-php)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)

PHPackages © 2026

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