PHPackages                             phpab/phpab - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. phpab/phpab

ActiveLibrary[Testing &amp; Quality](/categories/testing)

phpab/phpab
===========

A PHP library to create A/B tests.

0.1.0(10y ago)8442.4k↓37.5%8[6 issues](https://github.com/phpab/phpab/issues)[1 PRs](https://github.com/phpab/phpab/pulls)3MITPHPPHP &gt;=5.3.3

Since Mar 29Pushed 9y ago10 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (4)Used By (3)

phpab
=====

[](#phpab)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a7d70ac377cfcb968b71baa725b008c7e1ef7f434a08c14279e8b7e3c529107d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70687061622f70687061622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phpab/phpab)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/084df8fab5f49920ecf90e47fcd153dcfa1ac74bf4aae8a2d7f6c029616bb00c/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f70687061622f70687061622f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/phpab/phpab)[![Coverage Status](https://camo.githubusercontent.com/35436a3e90e4171da29d79e4f6f7f7da272d7106d27ae4b7722b0d75f096e2f4/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f70687061622f70687061622e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/phpab/phpab/code-structure)[![Quality Score](https://camo.githubusercontent.com/3db6c4f6dbfeb21a30be12aa03884ef37cce62b4dbbdd0830c3cfa6c58a00124/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f70687061622f70687061622e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/phpab/phpab)[![Total Downloads](https://camo.githubusercontent.com/5adcf39f182c489d0655f48cea3656f82444a1441fcff703eee08127ec52c2fd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70687061622f70687061622e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phpab/phpab)

This is a PHP library to implement A/B testing.

Install
-------

[](#install)

Via Composer

```
$ composer require phpab/phpab
```

Usage
-----

[](#usage)

Take a look at the example directory.

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please open an issue in the issue tracker. We realize this is not ideal but it's the fastest way to get the issue solved.

Credits
-------

[](#credits)

- [Walter Tamboer](https://github.com/waltertamboer)
- [Patrick Heller](https://github.com/psren)
- [Mariano F.co Benítez Mulet](https://github.com/pachico)
- [All Contributors](https://github.com/phpab/phpab/graphs/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

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

3703d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ee7f711ef4d45ada0ac92c7ab2f548055a7cfbe718da6c4bbb81b2f6693c528?d=identicon)[waltertamboer](/maintainers/waltertamboer)

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

---

Top Contributors

[![HellPat](https://avatars.githubusercontent.com/u/1016798?v=4)](https://github.com/HellPat "HellPat (127 commits)")[![waltertamboer](https://avatars.githubusercontent.com/u/508054?v=4)](https://github.com/waltertamboer "waltertamboer (76 commits)")[![pachico](https://avatars.githubusercontent.com/u/2184438?v=4)](https://github.com/pachico "pachico (9 commits)")

---

Tags

ababtestingphptestingtestingtestABabtesting

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[mockery/mockery

Mockery is a simple yet flexible PHP mock object framework

10.7k497.0M23.6k](/packages/mockery-mockery)[php-mock/php-mock

PHP-Mock can mock built-in PHP functions (e.g. time()). PHP-Mock relies on PHP's namespace fallback policy. No further extension is needed.

36918.1M98](/packages/php-mock-php-mock)[brain/monkey

Mocking utility for PHP functions and WordPress plugin API

33812.5M350](/packages/brain-monkey)[ta-tikoma/phpunit-architecture-test

Methods for testing application architecture

10745.9M13](/packages/ta-tikoma-phpunit-architecture-test)[php-mock/php-mock-phpunit

Mock built-in PHP functions (e.g. time()) with PHPUnit. This package relies on PHP's namespace fallback policy. No further extension is needed.

1718.2M399](/packages/php-mock-php-mock-phpunit)[fr3d/swagger-assertions

Test your API requests and responses against your swagger definition

138850.9k5](/packages/fr3d-swagger-assertions)

PHPackages © 2026

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