wolfcast/browser-detection
The Wolfcast BrowserDetection PHP class facilitates the identification of the user's environment such as Web browser, version, platform family, platform version or if it's a mobile device or not.
2.9.9
1.2M downloads/mo
#3947 most downloaded on Packagist
Wolfcast/BrowserDetection
What this package is like to depend on
Last release 1 years ago
23 Mar 2025
Release timing varies
gaps range from 2 weeks to 2.2 years
Most releases are documented
notes for 10 of 12 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
12 releases · first in 2016
0 releases in the last 12 months
see the full history below
Release timeline
12 releases · Aug 2016 to Mar 2025Releases
latest 12-
2.9.923 Mar 2025Release notes
Open source →March 23, 2025
What's new since last version:
- Added macOS Sequoia detection for browsers that still correctly report the macOS version.
-
2.9.822 Apr 2024Release notes
Open source →April 21, 2024
What's new since last version:
- Added macOS Sonoma and macOS Ventura detection. Note that all the majors Web browsers have reported macOS Catalina since 2021 for any macOS 11+ versions. See the documentation of macVerToStr() for more details.
- Improved the library documentation when detecting Windows version names since Windows 11 is always reported as Windows 10. See windowsNTVerToStr() for more details.
- Updated HTML documentation of the library to the latest version of phpDocumentor.
-
2.9.721 Sep 2022Release notes
Open source →September 20, 2022
What's new since last version:
- Changed licensing to dual licensing: MIT or LGPL-3.0-only. This has no impact on existing users. You can continue under the previous license or switch to MIT.
-
2.9.602 May 2022Release notes
Open source →May 1, 2022
What's new since last version:
- Added support for Chrome OS.
- Added support for macOS Monterey and macOS Big Sur.
- Now correctly detects AArch64 as 64-bit.
- Added support for PHP 8.
- Tested with latest Web Browsers and platforms.
-
2.9.502 Feb 2020Release notes
Open source →February 2, 2020
What's new since last version:
- WARNING! Breaking change: complete rework of robots detection. Now robot name and version is detected in addition of browser name and version. Use
getRobotName()andgetRobotVersion()whenisRobot()is true. - WARNING! Breaking change: due to robots detection rework the following methods signatures has changed (
isRobotparameter removed):addCustomBrowserDetection(),checkSimpleBrowserUA(),checkBrowserUAWithVersion(). - Added possibility to support new robots with
addCustomRobotDetection(). - Added support for the new Microsoft Edge based on Chromium.
- Added version names for Android 10 and later (Google no longer use candy names for new versions).
- Added macOS Catalina detection.
- Added Windows Server 2019 detection (Windows Server 2016 can be no longer detected due to the fact that they both use the same version number and that the build is not included in the user agent).
- WARNING! Breaking change: complete rework of robots detection. Now robot name and version is detected in addition of browser name and version. Use
-
2.9.327 Mar 2019Release notes
Open source →March 27, 2019
What's new since last version:
- Fixed Edge detection on Android.
- Added Android Q detection.
- Now filtering superglobals.
-
2.9.201 Mar 2019 -
2.9.124 Aug 2018Release notes
Open source →August 23, 2018
What's new since last version:
- Fixed Chrome detection under iOS.
- Added Android Pie detection.
- Added macOS Mojave detection.
-
2.9.015 Jul 2018Release notes
Open source →July 15, 2018
What's new since last version:
- WARNING! Breaking change: new Wolfcast namespace. Use
new Wolfcast\BrowserDetection(). - iPad, iPhone and iPod are all under iOS now.
- Added Android Oreo detection.
- Added macOS High Sierra detection.
- Added UC Browser detection.
- Improved regular expressions (even less false positives).
- Removed AOL detection.
- Removed the following Web browsers detection: Amaya, Galeon, NetPositive, OmniWeb, Vivaldi detection (use
addCustomBrowserDetection()). - Removed the following legacy platforms detection: BeOS, OS/2, SunOS (use
addCustomPlatformDetection()).
To re-enable removed Web browsers and platforms in this release you can simply do:
$browser = new Wolfcast\BrowserDetection(); $browser->addCustomBrowserDetection('Amaya', 'amaya'); $browser->addCustomBrowserDetection('Galeon'); $browser->addCustomBrowserDetection('NetPositive'); $browser->addCustomBrowserDetection('OmniWeb'); $browser->addCustomBrowserDetection('Vivaldi'); $browser->addCustomPlatformDetection('BeOS'); $browser->addCustomPlatformDetection('OS/2'); $browser->addCustomPlatformDetection('SunOS'); - WARNING! Breaking change: new Wolfcast namespace. Use
-
2.5.128 Nov 2016Release notes
Open source →November 28, 2016
What's new since last version:
- Better detection of 64-bit platforms.
-
2.5.019 Aug 2016Nothing published for this version
-
2.4.002 Aug 2016Nothing published for this version