- added optional
$config
to MobileDetect constructor. - added
autoInitOfHttpHeaders
configuration which is by defaulttrue
. This enabled the old behavior from3.x
and2.x
that allows automatic detection of HTTP headers and User Agent from $_SERVER. - refactored internal CloudFront related methods and the way
setHttpHeaders
work. It no longer falls back on$_SERVER
. The method still callssetUserAgent
in caseHTTP_USER_AGENT
and friends are present. - added
maximumUserAgentLength
to the$config
, by default the limit is500
.
- new user agents
- Samsung Galaxy Tab S6 Lite #919
- Samsung Galaxy Tab S8 series #912
- PHP 8.x only.
- PSR-16 cache support.
- Constructor accepts
CacheFactory
class where you can inject your own PSR-6 Cache interfaces. - You need to explicitly
setUserAgent("...")
orsetUserAgentHeaders([...])
otherwise an exception is being thrown. -
scripts/
folder no longer included in the git tag release archive. - added performance tests
- regexes can be arrays of strings or strings
Launched 4.8.xx which contains PHP 8.x support, refactorings and external Cache support.
In December 2022 we released the version for PHP7.
Mobile Detect was split into two dev branches: 2.8.x
which will support PHP5, but is deprecated and
3.74.x
which supports PHP >= 7.3
In August 2013 the library has 1800+ stargazers and support for: composer, PHPUnit tests, PSR standards and a new webpage http://mobiledetect.net
Throughout 2012 the script has been updated constantly, and we have received tons of feedback and requests. In July 2012 we moved the repository from Google Code to GitHub in order to quickly accommodate the frequent updates and to involve more people.
In December 2011 it received a major update from the first version, an important number of issues were fixed, then 2.0 was launched. The new version marks a new mindset and also featuring tablet detection.
The first version of the script was developed in 2009, and it was hosted at https://code.google.com/p/php-mobile-detect/, it was a small project with around 30 stars. (Original blog post by Victor: http://victorstanciu.ro/detectarea-platformelor-mobile-in-php/)