PHPackages                             lfphp/ua - 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. lfphp/ua

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

lfphp/ua
========

browser user agent resolver

0.0.2(4y ago)06MITPHP

Since Mar 18Pushed 3y ago1 watchersCompare

[ Source](https://github.com/sasumi/UA)[ Packagist](https://packagist.org/packages/lfphp/ua)[ RSS](/packages/lfphp-ua/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (0)

PHP 解析浏览器UA库
============

[](#php-解析浏览器ua库)

> 由于浏览器、系统、设备等不断更新，使用该库解析最新浏览器用户标识可能会出现错误识别等情况 如果有相关的问题，欢迎到  提issue，作者会尽快核实修复您 提到的问题。

快速入门
----

[](#快速入门)

\[安装\]

```
composer require lfphp/ua
```

\[使用\]

```
use LFPhp\UA\Resolver\Browser;
use LFPhp\UA\Resolver\Device;

$ua = $_SERVER['HTTP_USER_AGENT'];
list($device, $vendor, $version, $type) = Device::resolve($ua);
var_dump($device, $vendor, $version, $type);
list($browser, $version) = Browser::resolve($ua);
var_dump($browser, $version);
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

1521d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9944b00451fac65075c817cf981e9df2a1e8113f27066ba472a78ff86ce7f816?d=identicon)[sasumi](/maintainers/sasumi)

---

Top Contributors

[![sasumi](https://avatars.githubusercontent.com/u/166525?v=4)](https://github.com/sasumi "sasumi (12 commits)")

### Embed Badge

![Health badge](/badges/lfphp-ua/health.svg)

```
[![Health](https://phpackages.com/badges/lfphp-ua/health.svg)](https://phpackages.com/packages/lfphp-ua)
```

###  Alternatives

[league/glide-symfony

Glide adapter for Symfony

1025.7M27](/packages/league-glide-symfony)[codercat/jwk-to-pem

Convert JWK to PEM format.

1004.5M20](/packages/codercat-jwk-to-pem)[typisttech/imposter

Wrapping all composer vendor packages inside your own namespace. Intended for WordPress plugins.

111286.6k1](/packages/typisttech-imposter)[whitecube/laravel-timezones

Store UTC dates in the database and work with custom timezones in the application.

106106.2k](/packages/whitecube-laravel-timezones)[mkraemer/react-pcntl

PCNTL bindings for ReactPHP

57289.0k9](/packages/mkraemer-react-pcntl)

PHPackages © 2026

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