PHPackages                             wheregroup/platform-detect - 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. wheregroup/platform-detect

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

wheregroup/platform-detect
==========================

Platform detection for PHP

0.0.1(6y ago)08.8k1MITPHPPHP &gt;=5.3CI failing

Since Sep 20Pushed 6y ago2 watchersCompare

[ Source](https://github.com/WhereGroup/platform-detect)[ Packagist](https://packagist.org/packages/wheregroup/platform-detect)[ RSS](/packages/wheregroup-platform-detect/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (2)Used By (1)

Detect / distinguish operating system platform in PHP.

Unlinke a simple directory separator test, can tell the difference between Mac OS X, BSD and Linux, and recognizes Cygwin as Windows, not as a generic unix. See [consts definitions](https://github.com/WhereGroup/platform-detect/blob/master/lib/Platform.php#L9)for possible detection outcomes.

Can also detect legacy 32 bit platforms.

```
php > $platform = \WhereGroup\PlatformDetect\Platform::guess();
php > echo $platform->getOrder() . "\n";
NIX
php > echo $platform->getFamily() . "\n";
LINUX
php > echo $platform->getBitness() . "\n";
64

```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity43

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

Unknown

Total

1

Last Release

2479d ago

### Community

Maintainers

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

---

Top Contributors

[![werrolf](https://avatars.githubusercontent.com/u/24895932?v=4)](https://github.com/werrolf "werrolf (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wheregroup-platform-detect/health.svg)

```
[![Health](https://phpackages.com/badges/wheregroup-platform-detect/health.svg)](https://phpackages.com/packages/wheregroup-platform-detect)
```

###  Alternatives

[rachidlaasri/travel

Framework agnostic PHP package to control the time.

284180.9k4](/packages/rachidlaasri-travel)

PHPackages © 2026

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