PHPackages                             khsing/wechat-agent - 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. khsing/wechat-agent

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

khsing/wechat-agent
===================

Detect wechat version and network type information

v1.2(8y ago)01.1kMITPHP

Since Feb 28Pushed 8y ago1 watchersCompare

[ Source](https://github.com/khsing/wechat-agent)[ Packagist](https://packagist.org/packages/khsing/wechat-agent)[ RSS](/packages/khsing-wechat-agent/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

Intro
=====

[](#intro)

Detect wechat user agent and compare version

This package based on [jenssegers/agent](https://github.com/jenssegers/agent), so that all functions are compatible.

Usage
=====

[](#usage)

- Detect wechat user agent

```
use Khsing\WechatAgent\WechatAgent;
$agent = new WechatAgent;

$agent->is("Wechat"); // return true or false
```

- Get version of wechat

```
$agent->version("Wechat");

```

- Compare version

```
$agent->version_compare("Wechat", "6.6.3"); // return -1 if lower than 6.6.3, return 0 if equal, return 1 if greater than 6.6.3
$agent->version_compare("Wechat", "6.6.1", ">="); // return true if greater than 6.6.1
```

- Get network type

```
$agent->nettype() // return 4G/WIFI etc.
```

Thanks

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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 ~0 days

Total

3

Last Release

2996d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c68396cee81eeadca4e4f808c719710b8c2eebb6b0232733fd3de39d8d37b9ad?d=identicon)[khsing](/maintainers/khsing)

---

Top Contributors

[![khsing](https://avatars.githubusercontent.com/u/40765?v=4)](https://github.com/khsing "khsing (6 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/khsing-wechat-agent/health.svg)

```
[![Health](https://phpackages.com/badges/khsing-wechat-agent/health.svg)](https://phpackages.com/packages/khsing-wechat-agent)
```

###  Alternatives

[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[open-southeners/laravel-companion-apps

Extend your Laravel applications with companions apps (Android, iOS, PWA...)

233.9k](/packages/open-southeners-laravel-companion-apps)[cleaniquecoders/shrinkr

Shrinkr is a Laravel package for shortening URLs, with custom slugs, analytics, branded domains, and seamless API integration.

142.9k](/packages/cleaniquecoders-shrinkr)

PHPackages © 2026

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