PHPackages                             thechiddx3/telcodetect - 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. thechiddx3/telcodetect

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

thechiddx3/telcodetect
======================

Instantly identify which Nigerian mobile network a phone number belongs to, by NCC-assigned prefix.

10PHP

Since Feb 19Pushed 4mo agoCompare

[ Source](https://github.com/thechiddx3/telecodetect)[ Packagist](https://packagist.org/packages/thechiddx3/telcodetect)[ RSS](/packages/thechiddx3-telcodetect/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

TelcoDetect
===========

[](#telcodetect)

> Instantly identify which Nigerian mobile network a phone number belongs to, by NCC-assigned prefix.

---

> **Results may be inaccurate for ported numbers.**
> Nigeria's Mobile Number Portability (MNP) scheme allows subscribers to switch networks while keeping their original number. A number with an MTN prefix (e.g. `0803`) may therefore be actively used on Glo, Airtel, or any other network after porting. TelcoDetect has no way to detect this — it can only report the network originally assigned to the prefix.

Use results as a best-effort suggestion, not a guarantee.

---

Features
--------

[](#features)

- Detects **MTN**, **Glo**, **Airtel**, **9mobile**, and **Ntel**
- Supports multiple number formats: `080XXXXXXXX`, `+23480XXXXXXXX`, `23480XXXXXXXX`
- No external dependencies

---

Package Structure
-----------------

[](#package-structure)

```
Telcodetect/
├── src/
│   └── TelcoDetect.php   ← Core package (Detector, Network, PrefixRegistry, Normaliser)
├── logos/                ← Network logo images
│   ├── mtn.png
│   ├── glo.png
│   ├── airtel.png
│   ├── 9mobile.png
│   └── ntel.png
├── index.php             ← Web demo / usage example
└── README.md

```

---

Usage
-----

[](#usage)

```
require_once 'src/TelcoDetect.php';

use TelcoDetect\Detector;
use TelcoDetect\UnknownNetworkException;

$detector = new Detector();

// Returns a DetectionResult object
$result = $detector->detect('08031234567');

echo $result->network->name;   // "MTN Nigeria"
echo $result->prefix;          // "0803"
echo $result->normalised;      // "08031234567"

// Safe version — returns null instead of throwing
$result = $detector->tryDetect('00000000000');
// $result === null
```

---

Requirements
------------

[](#requirements)

- PHP 8.1+
- MAMP / Apache / any PHP-capable web server

---

License
-------

[](#license)

MIT

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance51

Moderate activity, may be stable

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a3f0bb4716067ed55a4d1013094bab7e55ff9c7c4f62272b1da0b5f850eecc3?d=identicon)[thechidd](/maintainers/thechidd)

---

Top Contributors

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

---

Tags

packagephptelecom

### Embed Badge

![Health badge](/badges/thechiddx3-telcodetect/health.svg)

```
[![Health](https://phpackages.com/badges/thechiddx3-telcodetect/health.svg)](https://phpackages.com/packages/thechiddx3-telcodetect)
```

###  Alternatives

[hisune/echarts-php

A php wrapper for echarts javascript libraries

330208.8k5](/packages/hisune-echarts-php)[giacocorsiglia/stubs-generator

Generate stubs from any PHP code for IDE completion and static analysis.

26127.7k12](/packages/giacocorsiglia-stubs-generator)[astrotomic/php-deepface

A PHP adapter for the python deepface framework.

5410.1k11](/packages/astrotomic-php-deepface)[pantheon-systems/wordpress-composer

WordPress for Pantheon with a composer.json file.

13129.8k7](/packages/pantheon-systems-wordpress-composer)

PHPackages © 2026

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