{"id":22092127,"url":"https://github.com/krakphp/ab","last_synced_at":"2025-03-23T23:44:58.780Z","repository":{"id":57009000,"uuid":"76819802","full_name":"krakphp/ab","owner":"krakphp","description":"AB Testing Library","archived":false,"fork":false,"pushed_at":"2016-12-19T04:44:37.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T06:52:26.692Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krakphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-19T02:06:09.000Z","updated_at":"2016-12-19T02:12:58.000Z","dependencies_parsed_at":"2022-08-21T14:50:49.231Z","dependency_job_id":null,"html_url":"https://github.com/krakphp/ab","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakphp%2Fab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakphp%2Fab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakphp%2Fab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krakphp%2Fab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krakphp","download_url":"https://codeload.github.com/krakphp/ab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245186924,"owners_count":20574554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-01T03:08:24.499Z","updated_at":"2025-03-23T23:44:58.749Z","avatar_url":"https://github.com/krakphp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AB Testing Library\n\n`Krak\\AB` is a framework for implementing AB Tests.\n\n## Installation\n\nInstall with composer at `krak/ab`\n\n## Usage\n\n```php\n\u003c?php\n\nuse Krak\\AB;\n\n$exp = AB\\Experiment::create('flow', [\n    // first is the variant name, second is the ratio.\n    ['standard', 80],\n    ['variant', 20],\n]);\n\n$engine = AB\\engine([$exp], new Logger()); // any PSR Logger will work\n// The default engine is the Hashing engine\n\nforeach (range(1, 10) as $i) {\n    //\n    echo $engine-\u003eactivate('flow', 'id_'.$i.rand()) . PHP_EOL;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrakphp%2Fab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrakphp%2Fab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrakphp%2Fab/lists"}