2017 © Pedro Peláez
 

library split-testing

A server-side A/B/n testing tool

image

dimgraycat/split-testing

A server-side A/B/n testing tool

  • Saturday, September 2, 2017
  • by dimgraycat
  • Repository
  • 1 Watchers
  • 2 Stars
  • 5,540 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 1 % Grown

The README.md

License Latest Stable Version Minimum PHP Version Travis, (*1)

SplitTesting

A server-side A/B/n testing tool, (*2)

This library provides a layer to run AB tests on your applications. The "SplitTesting" is useful when you want to change something on the application, but you want to check the optimize by using various variations., (*3)

Installation

$ composer require dimgraycat/split-testing

```json { "require": { "dimgraycat/split-testing": "^1.0" } }, (*4)


And install dependencies: ```bash $ curl -sS https://getcomposer.org/installer | php $ php composer.phar install

Usage

Random

<?php
use Ab\SplitTesting;

$params = array(
    'use' => 'random',
    'variation' => array(
        'foo',
        'bar',
        'baz'
    );
);

$result = SplitTesting::get($params);

// $seed is optional
// e.g.) userId, IpAddress
$seed = 1234;
echo SplitTesting::get($params, $seed);

Rate (Roulette)

<?php
use Ab\SplitTesting;

$params = array(
    'use'       => 'rate',
    'variation' => array(
        'rate'  => array(
            // 1 => 0.1%, 50 => 5%, 500 => 50%, 1000 => 100%
            'foo' => 50,
            'bar' => 20,
            'baz' => 500,
        ),
        'list'  => array(
            'default'   => array('hoge'),
            'a'         => '5%',
            'hoge'      => 1234567890,
            'moge'      => '123456789',
        ),
    ),
);
echo SplitTesting::get($params);

PatternMatch

<?php
use Ab\SplitTesting;

$params = array(
    'use'       => 'pattern',
    'variation' => array(
        'pattern'   => array(
            'foo' => '/[0-9]$/',
            'bar' => '/z$/',
        ),
        'list'      => array(
            'default'    => 'default',
            'foo'       => 'hit 1!',
            'bar'       => 'hit 2!'
        ),
    ),
);

$seed = 1234; // required
echo SplitTesting::get($params, $seed); // hit 1!

The Versions

02/09 2017

dev-master

9999999-dev http://github.com/dimgraycat/php-split-testing

A server-side A/B/n testing tool

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Avatar dimgraycat

testing ab split optimizely

02/09 2017

1.0.1

1.0.1.0 http://github.com/dimgraycat/php-split-testing

A server-side A/B/n testing tool

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Avatar dimgraycat

testing ab split optimizely

02/09 2017

dev-1.0.x-dev

dev-1.0.x-dev http://github.com/dimgraycat/php-split-testing

A server-side A/B/n testing tool

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Avatar dimgraycat

testing ab split optimizely

17/02 2017

1.0.0

1.0.0.0 http://github.com/dimgraycat/php-split-testing

A server-side A/B/n testing tool

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Avatar dimgraycat

testing ab split optimizely

14/01 2017

0.5.0

0.5.0.0 http://github.com/dimgraycat/php-split-testing

A server-side A/B/n testing tool

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Avatar dimgraycat

testing ab split optimizely