PHPackages                             mobile-detector/php - 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. mobile-detector/php

ActiveLibrary

mobile-detector/php
===================

PHP package to detect mobile network operators from phone numbers

v1.0.0(2mo ago)01MITPHPPHP &gt;=8.1

Since Feb 25Pushed 2mo agoCompare

[ Source](https://github.com/Normento/mobile-detector-php)[ Packagist](https://packagist.org/packages/mobile-detector/php)[ RSS](/packages/mobile-detector-php/feed)WikiDiscussions main Synced 1mo ago

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

mobile-detector/php
===================

[](#mobile-detectorphp)

Package PHP pour détecter l'opérateur mobile à partir d'un numéro de téléphone.

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

[](#installation)

```
composer require mobile-detector/php
```

Utilisation
-----------

[](#utilisation)

```
use MobileDetector\Detector;

$result = Detector::detect('bj', '0161159868');
// [
//   'operator' => 'MTN',
//   'country' => 'BJ',
//   'normalized' => '+2290161159868',
//   'isValid' => true
// ]
```

API
---

[](#api)

### `Detector::detect(string $countryCode, string $phoneNumber): array`

[](#detectordetectstring-countrycode-string-phonenumber-array)

Détecte l'opérateur mobile à partir du code pays et du numéro de téléphone.

**Paramètres:**

- `$countryCode`: Code pays (ex: 'bj', 'BJ', '229', '+229')
- `$phoneNumber`: Numéro de téléphone (tous formats supportés)

**Retour:**

```
[
  'operator' => string|null,    // 'MTN', 'Moov', 'Celtiis', ou null
  'country' => string,           // Code ISO du pays (ex: 'BJ')
  'normalized' => string,        // Numéro normalisé (format international)
  'isValid' => bool,             // Si le numéro est valide
  'metadata' => array            // Métadonnées optionnelles
]
```

Formats Supportés
-----------------

[](#formats-supportés)

Tous ces formats sont acceptés pour le Bénin :

- `002290161159868`
- `+2290161159868`
- `2290161159868`
- `0161159868`
- `61159868`
- `22961159868`

Status
------

[](#status)

🚧 Version 1.0.5

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance84

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

82d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4b932d91e5ce946cad0b334f60da573e69252759a42aebb3dea9970864e52673?d=identicon)[normento](/maintainers/normento)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mobile-detector-php/health.svg)

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

PHPackages © 2026

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