PHPackages                             flags/php-sdk - 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. flags/php-sdk

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

flags/php-sdk
=============

An SDK for the Flags application written in PHP.

1.0.1(7y ago)02PHPPHP ~7.1.0

Since Oct 25Pushed 7y ago2 watchersCompare

[ Source](https://github.com/bcerban/flags-php-sdk)[ Packagist](https://packagist.org/packages/flags/php-sdk)[ RSS](/packages/flags-php-sdk/feed)WikiDiscussions develop Synced 6d ago

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

flags-php-sdk
=============

[](#flags-php-sdk)

An SDK for the Flags application written in PHP

### Installation

[](#installation)

```
composer require flags/php-sdk
```

### Usage

[](#usage)

1. Obtain an auth token

```
$user = new \Flags\User($email, $password);
$authorizer = new \Flags\Authorizer();
$authorizer->authorize($user);
```

The authorizer will return the same user instance with a fresh token.

2. Define the flag you want to evaluate

```
$flag = new \Flags\Flag($flagIdentifier);
```

Here, `$flagIdentifier` is a string, corresponding to the flag's token.

3. Evaluate the flag

```
$evaluator = new \Flags\Evaluator();
$response = $evaluator->evaluate($flag, $user, $applicationUser);
$response->getResult();
```

Here, `$applicationUser` is a string representing the application user's identifier.

### Demo

[](#demo)

You can see a working example by running `php examples/demo.php`. You will need to provide valid user information in `examples/demo.json`.

### Contributing

[](#contributing)

1. Clone this repo.
2. Run `composer update` from the root directory.
3. Check everything is working by running the tests via `vendor/bin/phpunit`

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community8

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

Total

2

Last Release

2727d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13242256?v=4)[Bettina](/maintainers/bcerban)[@bcerban](https://github.com/bcerban)

---

Top Contributors

[![bcerban](https://avatars.githubusercontent.com/u/13242256?v=4)](https://github.com/bcerban "bcerban (18 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/flags-php-sdk/health.svg)

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

###  Alternatives

[tapp/filament-google-autocomplete-field

Filament plugin that provides a Google Autocomplete field

3098.1k](/packages/tapp-filament-google-autocomplete-field)

PHPackages © 2026

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