phpScenario

A Free Split Testing Library for PHP

What is phpScenario?

phpScenario is an object-oriented split testing library written in PHP. It's designed to do simple A/B testing with as little code as possible, but should also be as powerful as you need it to be.

Some key features:

How do I use it?

Once you've set up the library, do something like this:


<?php
if (Scenario::IsControl('my_test')) {
    
// control version
} else { 
    
// alternate version

?>

When you're ready to mark a treatment "completed":


<?php
Scenario
::Complete('my_test');
?>

Finally, render your results (as seen above):


<?php
Scenario
::RenderXml('my_test');
?>

Of course, this is the simplest possible usage case, simple A/B split testing. I'll try to get some more advanced tutorials online as soon as possible. You might check the discussion forums for more advanced usage.

What do results look like?

You can style this however you want, but here's how the included XSL renders it:

Experiment "mytest"

  • 519 overall results
  • 268 overall conversions
  • 51.64% overall conversion rate
Experiment "mytest" Results
TreatmentTestedCompletedConv.RateZ-Score
"default"24612852.03%(control)
"alternate"27314051.28%-0.17084
blog comments powered by Disqus