PHPackages                             helip/phonenumber - 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. helip/phonenumber

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

helip/phonenumber
=================

a library to manage belgian phone numbers

09[1 PRs](https://github.com/helinp/helip-phone-number/pulls)PHPCI passing

Since Sep 12Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/helinp/helip-phone-number)[ Packagist](https://packagist.org/packages/helip/phonenumber)[ RSS](/packages/helip-phonenumber/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Helip PhoneNumber Library
=========================

[](#helip-phonenumber-library)

Helip PhoneNumber is a simple PHP library for validating and formatting phone numbers. This library supports identifying phone number types (mobile, fixed) and converting phone numbers to their international format.

Limitations
-----------

[](#limitations)

Currently, the library only formats and validates Belgian phone numbers. International countries currently recognized but not formatted: FR, DE, NL, LU, CH, AT, IE, GB, LI

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

[](#installation)

To install the library, use Composer:

```
composer require helip/phonenumber
```

Usage
-----

[](#usage)

### Basic Example

[](#basic-example)

```
use Helip\PhoneNumber\PhoneNumber;
use Helip\PhoneNumber\Exceptions\InvalidPhoneNumberException;

try {
    $phoneNumber = new PhoneNumber('+32471234567');
    echo $phoneNumber->getInternationalFormat(); // Output: +32 471 234 567
    echo $phoneNumber->getCountryCode(); // Output: BE
    echo $phoneNumber->getType(); // Output: PhoneNumberModel::TYPE_MOBILE
} catch (InvalidPhoneNumberException $e) {
    echo 'Invalid phone number.';
}
```

### Features

[](#features)

- **Phone Number Validation:** Checks if a phone number is valid and matches the expected format.
- **Country Code Detection:** Identifies the country based on the phone number. Currently supports Belgian phone numbers.
- **Phone Number Type Detection:** Differentiates between mobile and fixed phone numbers.
- **International Format:** Converts phone numbers to a standardized international format.

Running Tests
-------------

[](#running-tests)

This library includes PHPUnit tests to validate its functionality. You can run the tests by executing:

```
vendor/bin/phpunit
```

Contributing
------------

[](#contributing)

Feel free to submit issues and pull requests. Make sure to follow the coding standards using PHPStan and PHP CS Fixer.

License
-------

[](#license)

This library is licensed under the LGPL-3.0-or-later license.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance53

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity19

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/9d4c88dc97ceb49817f96dbd5313804ecc519a17a665cd76d0155f35a643646d?d=identicon)[helip](/maintainers/helip)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/helip-phonenumber/health.svg)

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

###  Alternatives

[bizley/cookiemonster

Yii extension to manage cookie warning.

2020.1k1](/packages/bizley-cookiemonster)[myth/collection

Javascript inspired, supercharged array object for PHP.

165.3k2](/packages/myth-collection)

PHPackages © 2026

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