PHPackages                             gabeta/gsm-detector - 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. gabeta/gsm-detector

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

gabeta/gsm-detector
===================

Detect a GSM form phone number

v1.1.0(2y ago)912831MITPHP

Since Dec 26Pushed 2y ago1 watchersCompare

[ Source](https://github.com/gabeta/gsm-detector)[ Packagist](https://packagist.org/packages/gabeta/gsm-detector)[ RSS](/packages/gabeta-gsm-detector/feed)WikiDiscussions main Synced today

READMEChangelog (4)Dependencies (1)Versions (5)Used By (1)

[![Build Status](https://camo.githubusercontent.com/30d4ac52758f83655809af8b0c391b6b54df358a31014b5b59240b44229e3cd8/68747470733a2f2f7472617669732d63692e6f72672f6761626574612f67736d2d6465746563746f722e7376673f6272616e63683d6d61696e)](https://travis-ci.org/gabeta/gsm-detector)

A propos
--------

[](#a-propos)

Gsm Detector is a PHP package which allows to know the name of the GSM network of a given phone number.

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

[](#installation)

Compatible with PHP &gt;= 5.4

```
composer require gabeta/gsm-detector
```

How it works
------------

[](#how-it-works)

You must initiate the **GsmDetector** class with an array containing the names of GSM networks and their different prefixes.

**Code d'exmple:**

```
use Gabeta\GsmDetector\GsmDetector;

$gsmDetector = new GsmDetector([
    'orange' => [
        'fix' => ['22', '35'],
        'mobile' => ['09', '88']
    ],
    'mtn' => [
        'fix' => ['23', '24'],
        'mobile' => ['04', '05']
    ],
]);
```

Here we instantiate our class with the GSM **mtn and orange** networks and their different prefixes. Each GSM network defined in our table must have the "fix" and / or "mobile" keys to define our various prefixes.

```
use Gabeta\GsmDetector\GsmDetector;

$gsmDetector = new GsmDetector([
    'orange' => [
        'fix' => ['22', '35'],
        'mobile' => ['09', '88']
    ],
    'mtn' => [
        'fix' => ['23', '24'],
        'mobile' => ['04', '05']
    ],
]);

$gsmDetector->isMtn('04000000') // true

$gsmDetector->isMtn('24000000') // true

$gsmDetector->isMtn('35000000') // false

$gsmDetector->isMtn('08000000') // false

$gsmDetector->isMtn('23000000') // true

$gsmDetector->isOrange('88000000') // true

$gsmDetector->isOrange('09000000') // true

$gsmDetector->isOrange('22000000') // true

$gsmDetector->isMtnFix('23000000') // true

$gsmDetector->isMtnFix('24000000') // true

$gsmDetector->isMtnFix('04000000') // false

$gsmDetector->isMtnMobile('04000000') // true

$gsmDetector->isOrangeFix('22000000') // true

$gsmDetector->isOrangeFix('35000000') // true

$gsmDetector->isOrangeMobile('35000000') // false

/**
* OTHERS METHODS
**/

$gsmDetector->getGsmName('04000000'); // mtn

$gsmDetector->isMobile('04000000'); // true

$gsmDetector->isFix('04000000'); // false
```

For each new name of GSM defines three methods are created:

- is{Gsm}
- is{Gsm}Fix
- is{Gsm}Mobile

For moov for example we will therefore have:

- isMoov
- isMoovFix
- isMoovMobile

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.9% 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 ~394 days

Total

4

Last Release

831d ago

PHP version history (3 changes)v1PHP &gt;=7

v1.0.1PHP &gt;=7.2

v1.0.2PHP ^5.4|^5.5|^5.6|^7.0|^7.1|^7.2|^7.3|^7.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16475656?v=4)[Gabeta Soro](/maintainers/gabeta)[@gabeta](https://github.com/gabeta)

---

Top Contributors

[![gabeta](https://avatars.githubusercontent.com/u/16475656?v=4)](https://github.com/gabeta "gabeta (47 commits)")[![papac](https://avatars.githubusercontent.com/u/9353811?v=4)](https://github.com/papac "papac (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gabeta-gsm-detector/health.svg)

```
[![Health](https://phpackages.com/badges/gabeta-gsm-detector/health.svg)](https://phpackages.com/packages/gabeta-gsm-detector)
```

###  Alternatives

[access-manager/access-manager

The Hotspot Management System

615.2k](/packages/access-manager-access-manager)

PHPackages © 2026

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