NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #1530 most downloaded on Packagist
Lightning fast, minimalist PHP UserAgent string parser.
Latest stable
v1.12.0
Last release 5 months ago
16 Jun 2026
Release timing varies
gaps range from 4 weeks to 1.2 years
Most releases are documented
notes for 49 of 55 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
55 releases · first in 2013
Drag across the ruler to compare, or tap a release to open it.
Adds / Improves support for bots.
Adds / Improves support for bots.
Formal support for many many bots including Claude and Perplexity among many others.
Adds a new Bots helper class you can use for identifying specific bots.
Full Changelog: v1.11.0...v1.12.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Adds / Improves support for bots.
Formal support for many many bots including Claude and Perplexity among many others.
Adds a new Bots helper class you can use for identifying specific bots.
Full Changelog: https://github.com/donatj/PhpUserAgent/compare/v1.11.0...v1.12.0
Test in PHP 8.4 by @donatj in #101
Full Changelog: v1.10.0...v1.11.0
Full Changelog: https://github.com/donatj/PhpUserAgent/compare/v1.10.0...v1.11.0
Add support for Naver Whale by @donatj in #100
Full Changelog: https://github.com/donatj/PhpUserAgent/compare/v1.9.0...v1.10.0
Update PHP to 8.3 - ci.yml by @donatj in #93
Full Changelog: https://github.com/donatj/PhpUserAgent/compare/v1.8.0...v1.9.0
Bump actions/checkout from 2 to 3 by @dependabot in https://github.com/donatj/PhpUserAgent/pull/87
Full Changelog: https://github.com/donatj/PhpUserAgent/compare/v1.7.0...v1.8.0
DEPRECATED RELEASE - PLEASE UPGRADE TO 1.7.0 for EXACT PARITY
Full Changelog: https://github.com/donatj/PhpUserAgent/compare/v1.6.1...v1.7.0
Make Edge case sensitive by @donatj in https://github.com/donatj/PhpUserAgent/pull/82 - Thanks @PatNowak
Full Changelog: https://github.com/donatj/PhpUserAgent/compare/v1.6.0...v1.6.1
Add Support for Android Edge a36be7dfd22b100ce51845e26cc4c07831d5f3da
Full Changelog: https://github.com/donatj/PhpUserAgent/compare/v1.5.0...v1.6.0
- Adds PlayStation 5 support - Drops Support for PHP 5.3 - General cleanup - Improved Firefox test coverage
Adds official support for TelegramBot and Twitterbot.
Adds official support for TelegramBot and Twitterbot.
They were already detected but did not have constants nor tests.
Adds sniffing and support for iMessageBot.
Adds: - Support for Miui Browser - Support for Sailfish OS - Support for Sailfish Browser
Adds:
Older versions of UC Browser noted the platform as Adr rather than Android - handle this weirdness.
Adr rather than Android - handle this weirdness.Adds support for the Applebot - http://www.apple.com/go/applebot
Adds support for the Applebot - http://www.apple.com/go/applebot
parse_user_agent is deprecated in favor of \donatj\UserAgent\parse_user_agent
This is a major rework of the entire project that took just under 2 years. The utmost care went into considering how to keep this both the small and light library the community enjoys, but also add features people have been clamoring for since the beginning. I really believe we've hit the nail on the head here.
A lot of work went into not breaking compatibility especially for people not using composer. If you encounter any issues with compatibility let us know and we will fix it ASAP.
All required "functional" logic remains in a single file src/UserAgentParser.php This is specifically to make the library easy to use for people who do not use composer.
\donatj\UserAgent\UserAgentParser - Object oriented parse_user_agent call wrapper.\donatj\UserAgent\UserAgent - Object oriented response object.\donatj\UserAgent\UserAgentInterface - Helper interface for test mocking.\donatj\UserAgent\parse_user_agent function to mirror global parse_user_agent\donatj\UserAgent\PLATFORM = 'platform';\donatj\UserAgent\BROWSER = 'browser';\donatj\UserAgent\BROWSER_VERSION = 'version';\donatj\UserAgent\Browsers::*\donatj\UserAgent\Platforms::*parse_user_agent is deprecated in favor of \donatj\UserAgent\parse_user_agent
Thus require "{$dir}/src/UserAgentParser.php"; remains a supported method of using the library.
1.*The new 1.* release does not break compatibility with 0.* and nothing need to change to upgrade. However, the global parse_user_agent is now deprecated; it has been replaced with the namespaced \donatj\UserAgent\parse_user_agent and functions exactly the same. You can easily replace any existing call to parse_user_agent with \donatj\UserAgent\parse_user_agent
In addition, 1.x adds a convenience object wrapper you may use should you prefer. More information on this is in the Usage section of the README.
I would also like to personally thank @mimmi20 for helping review ideas early in the project's life cycle.
DEPRECATED RELEASE - PLEASE UPGRADE TO 1.8.0 for EXACT PARITY
See 1.8.0 for changelog
Full Changelog: v0.22.0...v0.23.0
# DEPRECATED RELEASE - PLEASE UPGRADE TO 1.7.0 for EXACT PARITY
https://github.com/donatj/PhpUserAgent/releases/tag/v1.6.1
https://github.com/donatj/PhpUserAgent/releases/tag/v1.6.1
Full Changelog: https://github.com/donatj/PhpUserAgent/compare/v0.21.0...v0.21.1
https://github.com/donatj/PhpUserAgent/releases/tag/v1.6.0
https://github.com/donatj/PhpUserAgent/releases/tag/v1.6.0
Full Changelog: https://github.com/donatj/PhpUserAgent/compare/v0.20.0...v0.21.0
This is a deprecated release for compatibility.
Adds official support for TelegramBot and Twitterbot.
They were already detected but did not have tests.
Adds sniffing and support for iMessageBot.
This is a deprecated release for compatibility.
The functionality of this release is mirrored exactly by v1.3.0 and does not break compatibility. You can easily upgrade.
Please upgrade ASAP.
This is a deprecated release for compatibility.
Adds:
This is a deprecated release for compatibility.
The functionality of this release is mirrored exactly by v1.3.0 and does not break compatibility. The 0.x releases will soon no longer be maintained. Please upgrade ASAP.
This is a deprecated release for compatibility.
Adr rather than Android - handle this weirdness.This is a deprecated release for compatibility.
The functionality of this release is mirrored exactly by v1.2.0 and does not break compatibility. The 0.x releases will soon no longer be maintained. Please upgrade ASAP.
Adds support for the Applebot - http://www.apple.com/go/applebot
Adds support for the Applebot - http://www.apple.com/go/applebot
The functionality of this release is mirrored by v1.1.0 and does not break backwards compatibility. The 0.x releases will soon no longer be maintained.
Corrects an issue detecting with newer versions of UC Browser. See: #63
Fixes:
Updates:
Drops support for Opera Next - it's not really a *thing* anymore and supporting it was interfering with proper detection of Opera propper.
Drops support for Opera Next - it's not really a thing anymore and supporting it was interfering with proper detection of Opera propper.
Adds basic support for Microsoft's new Blink based Edge browser. Slight improvements to PS4 support.
Adds basic support for Microsoft's new Blink based Edge browser. Slight improvements to PS4 support.
Warning: if you are directly requiring the PHP file rather than using composer this will be a breaking change.
I made a number of seemingly minor changes to the regular expressions that when benchmarked resulted in a nearly 3% performance improvement.
| Old Path | New Path |
|---|---|
| Source/ | src/ |
| Tools/ | bin/ |
| Tests/ | test/ |
Warning: if you are directly requiring the PHP file rather than using composer this will be a breaking change.
Adds basic support and tests for OculusBrowser
Adds basic support and tests for OculusBrowser
A cherry pick from an upstream branch went awry as it made use of a constant not currently defined.
Adds support for Yandex.
v0.11.0 was deleted.
A cherry pick from an upstream branch went awry as it made use of a constant not currently defined.
This hotfix removes said constant.
Now differentiates between HeadlessChrome and Chrome.
Now differentiates between HeadlessChrome and Chrome.
Adds Nintendo Switch browser support.
Adds Nintendo Switch browser support.
It was pointed out that a number of BSD based OS's showed up as "Linux" which isn't accurate/correct.
It was pointed out that a number of BSD based OS's showed up as "Linux" which isn't accurate/correct.
This has been corrected with the help of @goshoo
Adds support for the Puffin browser which is growing in popularity.
Adds support for the Puffin browser which is growing in popularity.
Adds support for "SamsungBrowser" for Android and Tizen
Adds support for "SamsungBrowser" for Android and Tizen
Adds support for IceCat detected as Firefox as with IceWeasel.
Adds support for IceCat detected as Firefox as with IceWeasel.
UC Browser has hit 7% globally and I decided I needed to support it officially.
UC Browser has hit 7% globally and I decided I needed to support it officially.
This release also includes a fairly large refactor that netted me -18 loc overall.
Adds rudamentary support for Valve Steam Tenfoot
Adds rudamentary support for Valve Steam Tenfoot
Somehow it had been overlooked all this time that iPod Touch has a distinct user agent from iPhone. Many thanks to @henrybaxter for pointing this out!
Somehow it had been overlooked all this time that iPod Touch has a distinct user agent from iPhone. Many thanks to @henrybaxter for pointing this out!
Nothing published for this version
Some Windows Phone versions spoof an Android User Agent. This helps better fight against the spoofing.
Some Windows Phone versions spoof an Android User Agent. This helps better fight against the spoofing.
This release adds the long requested support for Chrome for iOS.
This release adds the long requested support for Chrome for iOS.
Adds basic support for the Tizen Browser
Adds basic support for the Tizen Browser
Adds support for the new Vivaldi Browser.
Adds support for the new Vivaldi Browser.
Adds detection and tests for IE12's new User Agent String: Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985
Adds detection and tests for IE12's new User Agent String: Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.143 Safari/537.36 Edge/12.0
Also corrects some problems with Lumina Windows Phones
Adds support for the "New Nintendo 3DS" due out in the US early 2015.
Adds support for the "New Nintendo 3DS" due out in the US early 2015.
Nothing published for this version
This release adds fixes and tests for a number of issues parsing the new Windows Phone 8.1 monstrosity of a user agent string.
This release adds fixes and tests for a number of issues parsing the new Windows Phone 8.1 monstrosity of a user agent string.
See:
Mozilla/5.0 (Windows Phone 8.1; ARM; Trident/7.0; Touch; rv:11; IEMobile/11.0) like Android 4.1.2; compatible) like iPhone OS 7_0_3 MacWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.99 Mobile Safari /537.36
Note the mismatched parenthesis, and claims of being nearly every browser. Thanks, Microsoft!
Very happy Xbox One support added!
Very happy Xbox One support added!
Note: This is a slightly breaking change as what was "Windows Phone OS" / "Windows" is now uniformly returned as "Windows Phone"
Windows Phone 8 and BlackBerry 10 support overhauled.
Note: This is a slightly breaking change as what was "Windows Phone OS" / "Windows" is now uniformly returned as "Windows Phone"
Midori 0.5 and later releases of 0.4 included a reference to "Chrome" which threw off the order of operations. This was reworked to prioritize checkin
Midori 0.5 and later releases of 0.4 included a reference to "Chrome" which threw off the order of operations. This was reworked to prioritize checking if it was Midori first.
Updated to correctly identify between Android Browser and Chrome
Updated to correctly identify between Android Browser and Chrome
PlayStation 4(+?) support added.
PlayStation 4(+?) support added.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.