1. Go to this page and download the library: Download vimeo/ablincoln library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
vimeo / ablincoln example snippets
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
);
}
}
$my_exp = new MyExperiment(['userid' => 42]);
$my_exp->get('button_color');
$my_exp->get('button_text');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.