Registry / utility / donatj-phpuseragentparser

donatj-phpuseragentparser

JSON →
library1.12.0phppackagistunverified

Lightning fast, minimalist PHP UserAgent string parser.

composer require donatj/phpuseragentparser
INSTALL
IMPORT
SIG · DONATJ-PHPUSERAGEN
D
donatj-phpuseragentparser
utilityphpv1.12.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

UserAgentParser
use donatj\UserAgent\UserAgentParser;

Parse a user agent string and output browser name and version.

<?php require 'vendor/autoload.php'; use donatj\UserAgent\UserAgentParser; $parser = new UserAgentParser(); $ua = $parser->parse('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'); echo $ua->browser . ' ' . $ua->version;
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.12.0latest on Packagist
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
donatj-phpuseragentparser — pip install donatj-phpuseragentparser · libregistry