PHPackages                             vimeo/ablincoln - 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. vimeo/ablincoln

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

vimeo/ablincoln
===============

PHP library for designing online experiments

1.0.0(11y ago)153301.5k↓50%18[2 PRs](https://github.com/vimeo/ABLincoln/pulls)BSDPHPPHP &gt;=5.4.0

Since Nov 24Pushed 7y ago15 watchersCompare

[ Source](https://github.com/vimeo/ABLincoln)[ Packagist](https://packagist.org/packages/vimeo/ablincoln)[ RSS](/packages/vimeo-ablincoln/feed)WikiDiscussions master Synced 1mo ago

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

ABLincoln [![Latest Stable Version](https://camo.githubusercontent.com/b00869a3075d003dbc8240ec67c3ffec0077c59f1ddbabccb366ecc3e2488b54/68747470733a2f2f706f7365722e707567782e6f72672f76696d656f2f61626c696e636f6c6e2f762f737461626c652e737667)](https://packagist.org/packages/vimeo/ablincoln) [![Build Status](https://camo.githubusercontent.com/cf86d0e7500bb234fd71b03568c4008934b389eb0d95c6a88758ca5689df41c3/68747470733a2f2f7472617669732d63692e6f72672f76696d656f2f41424c696e636f6c6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/vimeo/ABLincoln)
=============================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#ablincoln--)

ABLincoln is a PHP-based implementation of Facebook's [PlanOut](http://facebook.github.io/planout/), a framework for online field experimentation. ABLincoln makes it easy to deploy and maintain sophisticated randomized experiments and to quickly iterate on these experiments, while satisfying the constraints of large-scale Internet services with many users.

Developers integrate ABLincoln by defining experiments that detail how *inputs*(e.g. users, cookie IDs) should get mapped onto conditions. To set up an experiment randomizing both the text and color of a button, you would create a class like this:

```
use \Vimeo\ABLincoln\Experiments\SimpleExperiment;
use \Vimeo\ABLincoln\Operators\Random as Random;

class MyExperiment extends SimpleExperiment
{
    public function assign($params, $inputs)
    {
        $params->button_color = new Random\UniformChoice(
            ['choices' => ['#ff0000', '#00ff00']],
            $inputs
        );
        $params->button_text = new Random\WeightedChoice(
            [
                'choices' => ['Join now!', 'Sign up.'],
                'weights' => [0.3, 0.7]
            ],
            $inputs
        );
    }
}
```

Then, in the application code, you query the Experiment object to find out what values the current user should be mapped onto:

```
$my_exp = new MyExperiment(['userid' => 42]);
$my_exp->get('button_color');
$my_exp->get('button_text');
```

Querying the experiment parameters automatically generates an exposure log that we can direct to a location of our choice:

```
{"name": "MyExperiment", "time": 1421622363, "salt": "MyExperiment", "inputs": {"userid": 42}, "params": {"button_color": "#ff0000", "button_text": "Join now!"}, "event": "exposure"}

```

The basic `SimpleExperiment` class logs to a local file by default. More advanced behavior, such as Vimeo's methodology [described below](#application-to-an-existing-logging-stack), can easily be introduced to better integrate with your existing logging stack.

### Installation

[](#installation)

ABLincoln is maintained as an independent PHP [Composer](https://getcomposer.org/) package hosted on [Packagist](https://packagist.org/packages/vimeo/ablincoln). Include it in in your `composer.json` file for nice autoloading and dependency management:

```
{
    "require": {
        "vimeo/ablincoln": "~1.0"
    }
}

```

### Comparison with the PlanOut Reference Implementation

[](#comparison-with-the-planout-reference-implementation)

ABLincoln and the original Python release of PlanOut are very similar in both functionality and usage. Both packages implement abstract and concrete versions of the Experiment and Namespace classes, parameter overrides to facilitate testing, exposure logging systems, and various random assignment operators tested and confirmed to produce identical outputs.

Notable differences between the two releases currently include:

- ABLincoln features native support for logging either to local files or to any PSR-compliant stack through the use of included PHP logging traits
- ABLincoln does not currently include an interpreter for the [PlanOut language](http://facebook.github.io/planout/docs/planout-language.html).

### Usage in Production Environments

[](#usage-in-production-environments)

ABLincoln was ported and designed with scalability in mind. Here are a couple ways that Vimeo has chosen to extend it to meet the needs of our testing process:

##### Application to an Existing Logging Stack

[](#application-to-an-existing-logging-stack)

The Experiment [logging traits](https://github.com/vimeo/ABLincoln/tree/master/src/Vimeo/ABLincoln/Experiments/Logging) provided with this port make it easy to log exposure data in the most convenient way possible for your existing stack. A quick implementation of the plug-and-play [FileLoggerTrait](src/Vimeo/ABLincoln/Experiments/Logging/FileLoggerTrait.php) and`tail -f` of the log file is all you need to monitor parameter exposures in real-time. Alternatively, the [PSRLoggerTrait](src/Vimeo/ABLincoln/Experiments/Logging/PSRLoggerTrait.php) allows more customizable integration with existing PSR-compliant logging code. Here at Vimeo, we use a basic [Monolog Handler](https://github.com/Seldaek/monolog) to enforce PSR-3 compliance and allow PlanOut to talk nicely to our existing logging infrastructure.

##### URL Overrides

[](#url-overrides)

ABLincoln already supports [parameter overrides](http://facebook.github.io/planout/docs/testing.html) for quickly examining the effects of difficult-to-test experiments. A simple way to integrate this behavior with a live site is to pass overrides into your endpoint as a query parameter:

```
http://my.site/home.php?overrides=button_color:green,button_text:hello

```

Then it's a relatively simple task to parse the overrides from the query and pass them into the PHP Experiment API override methods after instantiation.

### Thanks

[](#thanks)

[PlanOut](http://facebook.github.io/planout/), the software from which ABLincoln was ported, was originally developed by Eytan Bakshy, Dean Eckles, and Michael S. Bernstein, and is currently maintained by [Eytan Bakshy](https://github.com/eytan) at Facebook. Learn more about good practice in large-scale testing by reading their paper, [Designing and Deploying Online Field Experiments](http://www-personal.umich.edu/~ebakshy/planout.pdf).

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity48

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 98.5% 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 ~27 days

Total

4

Last Release

4112d ago

Major Versions

0.1.2 → 1.0.02015-02-13

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/6d70ffb3cb451c0ca2960b0765207d0549207670073af4f59087c1795086b606?d=identicon)[akalicki](/maintainers/akalicki)

---

Top Contributors

[![akalicki](https://avatars.githubusercontent.com/u/3604541?v=4)](https://github.com/akalicki "akalicki (200 commits)")[![jacoboliver](https://avatars.githubusercontent.com/u/469156?v=4)](https://github.com/jacoboliver "jacoboliver (2 commits)")[![phuedx](https://avatars.githubusercontent.com/u/191857?v=4)](https://github.com/phuedx "phuedx (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vimeo-ablincoln/health.svg)

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

###  Alternatives

[chh/pipe

Put your assets into the Pipe and smoke them.

1212.5k1](/packages/chh-pipe)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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