{"id":24716742,"url":"https://github.com/baylorrae/php-split","last_synced_at":"2025-03-22T09:21:02.459Z","repository":{"id":3122879,"uuid":"4150266","full_name":"BaylorRae/php-split","owner":"BaylorRae","description":"The source to my A/B testing framework with PHP videos","archived":false,"fork":false,"pushed_at":"2012-04-26T17:48:20.000Z","size":82,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-27T09:14:03.129Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.youtube.com/playlist?list=PL9A92A503E362534A","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BaylorRae.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-26T17:36:53.000Z","updated_at":"2016-07-22T10:01:27.000Z","dependencies_parsed_at":"2022-09-01T01:52:20.677Z","dependency_job_id":null,"html_url":"https://github.com/BaylorRae/php-split","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaylorRae%2Fphp-split","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaylorRae%2Fphp-split/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaylorRae%2Fphp-split/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BaylorRae%2Fphp-split/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BaylorRae","download_url":"https://codeload.github.com/BaylorRae/php-split/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244932948,"owners_count":20534259,"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":"2025-01-27T09:14:04.957Z","updated_at":"2025-03-22T09:21:02.439Z","avatar_url":"https://github.com/BaylorRae.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Syntax\n\n```php\n\u003c?php\n\nif( ab_test('show_message') ) {\n    \n}\n\n$cart_title = ab_test('basket_title', 'Shopping Cart', 'Basket', 'Cart'); // Basket\n\nab_test('name', 'option 1', 'option 2', function($text) {\n    echo $text;\n});\n\n// alias to Split\\Experiment\nfunction ab_test($name, $alternative_names = null) {\n    return Split\\Experiment($title, array_shift(func_get_args()));\n}\n\n// split/experiment.php\n\nnamespace Split;\n\nclass Experiment {\n    \n    public $name,\n           $winner;\n           \n    private $alternatives;\n    \n    function __construct($name, array $alternative_names = null) {\n        $this-\u003ename = $name;\n        \n        // store each alternative into its own class\n        foreach( $alternative_names as $alternative_name ) {\n            array_push($this-\u003ealternatives, new Alternative($alternative_name, $name));\n        }\n    }\n       \n}\n\n?\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaylorrae%2Fphp-split","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaylorrae%2Fphp-split","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaylorrae%2Fphp-split/lists"}