PHPackages                             sbrilenko/php-device-checker - 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. sbrilenko/php-device-checker

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

sbrilenko/php-device-checker
============================

PHP device checker

0.1.0(10y ago)3121MITPHP

Since Apr 3Pushed 10y ago1 watchersCompare

[ Source](https://github.com/sbrilenko/PHPDeviceChecker)[ Packagist](https://packagist.org/packages/sbrilenko/php-device-checker)[ RSS](/packages/sbrilenko-php-device-checker/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

[![Build Status](https://camo.githubusercontent.com/9d6804782392092f90b50a6bd0a58ae2cd2d9a8b16d6b06c8dc6b45a2876d459/68747470733a2f2f7472617669732d63692e6f72672f736272696c656e6b6f2f504850446576696365436865636b65722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/sbrilenko/PHPDeviceChecker)

PHP Device Checker
==================

[](#php-device-checker)

**PHPDeviceChecker** - can check mobile os by device token. Need for sending PN

Installation
------------

[](#installation)

add to your composer.json - `"sbrilenko/php-device-checker": "*"`

For now support Android And iOs devices

Just add device token

```
use \PHPDeviceChecker\PHPDeviceChecker;

$getIos = new PHPDeviceChecker("iOsDeviceTokenHere");
```

You will get:

{"iOsDeviceTokenHere":{"isiOs":true,"isAndroid":false,"os":"ios"}}

You can use functions to gen some values:

```
$getIos->isiOs(); //true
$getIos->isAndroid(); //false
$getIos->os(); //"ios"
```

or added array of device tokens

```
$tokenArray = new PHPDeviceChecker(["iOsDeviceToken","androidDeviceToken"]);
```

result:

{"iOsDeviceToken":{"isiOs":true,"isAndroid":false,"os":"ios"},"androidDeviceToken":{"isiOs":false,"isAndroid":true,"os":"android"}}

```
$tokenArray->isiOs(); // true By first token
$tokenArray->isAndroid(); // false By first token
$tokenArray->isiOs("iOsDeviceToken"); // true
$tokenArray->isAndroid("iOsDeviceToken"); // false
$tokenArray->isiOs("androidDeviceToken"); // false
$tokenArray->isAndroid("androidDeviceToken"); // true
$tokenArray->os(); // "ios" By first token
$tokenArray->os("iOsDeviceToken"); // "ios"
$tokenArray->os("androidDeviceToken"); // "android"
```

If you want add other platforms just send a pull request or create an issue.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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

3740d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3993717?v=4)[sbrilenko](/maintainers/sbrilenko)[@sbrilenko](https://github.com/sbrilenko)

---

Top Contributors

[![krydos](https://avatars.githubusercontent.com/u/910691?v=4)](https://github.com/krydos "krydos (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sbrilenko-php-device-checker/health.svg)

```
[![Health](https://phpackages.com/badges/sbrilenko-php-device-checker/health.svg)](https://phpackages.com/packages/sbrilenko-php-device-checker)
```

###  Alternatives

[airmanbzh/php-html-generator

PHP html generator

7975.1k5](/packages/airmanbzh-php-html-generator)[awesomemotive/wpforms-phpcs

WPForms Coding Standards

148.0k](/packages/awesomemotive-wpforms-phpcs)

PHPackages © 2026

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