PHPackages                             fam/util-useragentparser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fam/util-useragentparser

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

fam/util-useragentparser
========================

211[1 issues](https://github.com/dspasic/Fam/issues)[1 PRs](https://github.com/dspasic/Fam/pulls)PHP

Since Apr 20Pushed 9y ago1 watchersCompare

[ Source](https://github.com/dspasic/Fam)[ Packagist](https://packagist.org/packages/fam/util-useragentparser)[ RSS](/packages/fam-util-useragentparser/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Fam UserAgentParser
-------------------

[](#fam-useragentparser)

Fam UserAgentParser is a lightweight and fast browser detector. It determines the operating system, web client name and web client version.

---

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/c055d9d5f83e55a4aef9590f81d060dc68448a5e0f28cfd216e648c6373ffb29/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f647370617369632f46616d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/dspasic/Fam/?branch=master)[![build status for Fam](https://camo.githubusercontent.com/1c77e092b6129695c68bdd301a8030b5e82418429d341a56469bb7e19027ccc9/68747470733a2f2f6170692e7472617669732d63692e6f72672f647370617369632f46616d2e737667)](https://travis-ci.org/dspasic/Fam)[![Code Coverage](https://camo.githubusercontent.com/0272b7ca7d0dff97b74e7a70fd597837ddd9b7f640efa9a40710b4ebf99a1dc8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f647370617369632f46616d2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/dspasic/Fam/?branch=master)

---

### Installing

[](#installing)

You can install Fam UserAgentParser with [composer](https://getcomposer.org/). To install Fam UserAgentParser with composer just execute the following command:

```
composer require fam/util-useragentparser
```

Getting started
---------------

[](#getting-started)

```
$userAgent = UserAgentParser::createInstance()->parseUserAgent($_SERVER['HTTP_USER_AGENT']);

if ($userAgent->isWebClient('firefox')) {
    if ($userAgent->isWebClientVersionBetween(9.5, 9.6)) {
       echo 'firefox between 95 and 96';
    }
    else if ($userAgent->isWebClientVersionBetween(9.2, 9.4)) {
       echo 'firefox between 92 and 94';
    }
}

if ($userAgent->isOs('macintosh')) {
   echo 'Mac';
}
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e5c9d40cb86b42025ebbc80f9af346e177e836922e3d5db65d0f0a14c8f5b76?d=identicon)[three-quarters-stroke](/maintainers/three-quarters-stroke)

---

Top Contributors

[![dspasic](https://avatars.githubusercontent.com/u/88598?v=4)](https://github.com/dspasic "dspasic (72 commits)")

---

Tags

php

### Embed Badge

![Health badge](/badges/fam-util-useragentparser/health.svg)

```
[![Health](https://phpackages.com/badges/fam-util-useragentparser/health.svg)](https://phpackages.com/packages/fam-util-useragentparser)
```

###  Alternatives

[functional-php/trampoline

Trampoline implementation for PHP.

3517.7k1](/packages/functional-php-trampoline)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
