{"id":15306867,"url":"https://github.com/kenjis/user-agent-parser-benchmarks","last_synced_at":"2025-08-30T06:32:14.107Z","repository":{"id":22862130,"uuid":"26209813","full_name":"kenjis/user-agent-parser-benchmarks","owner":"kenjis","description":"PHP User Agent Parser Benchmarks","archived":false,"fork":false,"pushed_at":"2015-02-26T00:53:16.000Z","size":1664,"stargazers_count":29,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-15T00:35:37.088Z","etag":null,"topics":["benchmark","php"],"latest_commit_sha":null,"homepage":"","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/kenjis.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":"2014-11-05T08:12:55.000Z","updated_at":"2025-03-08T13:02:01.000Z","dependencies_parsed_at":"2022-08-21T13:30:36.711Z","dependency_job_id":null,"html_url":"https://github.com/kenjis/user-agent-parser-benchmarks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kenjis/user-agent-parser-benchmarks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenjis%2Fuser-agent-parser-benchmarks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenjis%2Fuser-agent-parser-benchmarks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenjis%2Fuser-agent-parser-benchmarks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenjis%2Fuser-agent-parser-benchmarks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kenjis","download_url":"https://codeload.github.com/kenjis/user-agent-parser-benchmarks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kenjis%2Fuser-agent-parser-benchmarks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272815807,"owners_count":24997661,"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","status":"online","status_checked_at":"2025-08-30T02:00:09.474Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["benchmark","php"],"created_at":"2024-10-01T08:08:05.793Z","updated_at":"2025-08-30T06:32:14.050Z","avatar_url":"https://github.com/kenjis.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP User Agent Parser Benchmarks\n\n## Results\n\n|parser            |time               |peak memory|\n|------------------|-------------------|----------:|\n|[get_browser()](http://php.net/get_browser)                |59.665177 |524288  |\n|[browscap-php](https://github.com/browscap/browscap-php)   | 4.9851598|50069504|\n|[crossjoin\\Browscap](https://github.com/crossjoin/Browscap)| 4.6786639|1310720 |\n|[ua-parser](https://github.com/ua-parser/uap-php)          | 0.6419560|2097152 |\n|[woothee-php](https://github.com/woothee/woothee-php)      | 0.0876269|524288  |\n\nNote(1): These parsers have different functionality. Generally speaking, it has more functionality, it becomes slower.\n\nNote(2): This benchmark is designed to parse only one user agent with one parser instance.\n\n## How to Benchmark\n\nInstall source code.\n\n~~~\n$ git clone https://github.com/kenjis/user-agent-parser-benchmarks.git\n$ cd user-agent-parser-benchmarks\n$ composer install\n~~~\n\nEdit `baseUrl` value in `config.php` if you need.\n\nPrepare benchmarks and web server.\n\n~~~\n$ sh bin/prepare.sh\n$ php -S localhost:8000\n~~~\n\nRun benchmarks.\n\n~~~\n$ php bin/run-benchmarks.php\n~~~\n\nSee \u003chttp://localhost:8000/benchmark.php\u003e.\n\n## Check your User Agent\n\nYou can check your user agent at \u003chttp://localhost:8000/check-your-ua.php\u003e.\n\n## How to Check Differences of Detections\n\nPrepare your user agent strings list file and set `userAgentListFile` value in `config.php`.\n\nRun benchmarks and normalize.\n\n~~~\n$ php bin/run-benchmarks.php\n$ php bin/normalize-output.php\n~~~\n\nShow differences.\n\n~~~\n$ php bin/show-diff.php\n~~~\n\n## Reference\n\n* http://php.net/get_browser\n* https://github.com/browscap/browscap-php\n* https://github.com/crossjoin/Browscap\n* https://github.com/ua-parser/uap-php\n* https://github.com/woothee/woothee-php\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenjis%2Fuser-agent-parser-benchmarks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkenjis%2Fuser-agent-parser-benchmarks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenjis%2Fuser-agent-parser-benchmarks/lists"}