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

ActiveLibrary

absurge/php
===========

ABsurge PHP SDK for feature flags and A/B testing

v0.2.0(1mo ago)00MITPHPPHP ^8.2

Since Jul 15Pushed 1mo agoCompare

[ Source](https://github.com/absurge/php)[ Packagist](https://packagist.org/packages/absurge/php)[ Docs](https://github.com/absurge/php)[ RSS](/packages/absurge-php/feed)WikiDiscussions master Synced 1w ago

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

absurge/php
===========

[](#absurgephp)

PHP SDK for [ABsurge](https://absurge.com) — feature flags and A/B testing.

Uses Laravel's HTTP client (`illuminate/http`).

Install
-------

[](#install)

```
composer require absurge/php
```

Usage
-----

[](#usage)

```
use ABsurge\ABsurge;

$absurge = new ABsurge(
    publishableKey: 'pk_...',
    baseUrl: 'https://your-app.example/api/v1',
    environment: 'production',
);

// Evaluate flags and experiments for a user
$result = $absurge->evaluate('user-123', ['plan' => 'pro']);

// Check a single flag
$enabled = $absurge->isEnabled('new-checkout', 'user-123');

// Get experiment assignment
$experiment = $absurge->getExperiment('pricing-test', 'user-123');

// Track events
$absurge->trackExposure('pricing-test', 'user-123');
$absurge->trackConversion('pricing-test', 'user-123', 'purchase', 49.0);
```

API
---

[](#api)

MethodDescription`evaluate($distinctId, $attributes = [], $flags = null, $experiments = null)`Batch evaluate flags and experiments`isEnabled($flag, $distinctId, $attributes = [])`Boolean flag check`getExperiment($experiment, $distinctId, $attributes = [])`Experiment variant assignment`trackExposure($experiment, $distinctId, $attributes = [])`Record experiment exposure`trackConversion($experiment, $distinctId, $event, $value = null, $properties = null)`Record conversion`trackReplay($experiment, $distinctId, $events, $durationMs = null)`Upload session replay eventsAuthenticate with your environment publishable key via the `X-ABsurge-Key` header (set automatically).

Requirements
------------

[](#requirements)

- PHP 8.2+
- `illuminate/http` ^12.0 or ^13.0

License
-------

[](#license)

MIT

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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

46d ago

### Community

Maintainers

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

---

Top Contributors

[![vblinden](https://avatars.githubusercontent.com/u/1420356?v=4)](https://github.com/vblinden "vblinden (3 commits)")

---

Tags

phpfeature-flagsexperimentsab-testingabsurge

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3365.5M359](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

80732.6M270](/packages/laravel-mcp)[illuminate/auth

The Illuminate Auth package.

10528.8M1.4k](/packages/illuminate-auth)[illuminate/routing

The Illuminate Routing package.

1419.6M3.8k](/packages/illuminate-routing)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45945.2k1](/packages/pressbooks-pressbooks)[api-platform/laravel

API Platform support for Laravel

58190.1k22](/packages/api-platform-laravel)

PHPackages © 2026

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