PHPackages                             damien-louis/libphonenumber-shortcuts - 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. damien-louis/libphonenumber-shortcuts

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

damien-louis/libphonenumber-shortcuts
=====================================

Shortcuts to use libphonenumber quickly and easily

0.1.1(2y ago)2845MITPHPPHP &gt;=8.1

Since Dec 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/damien-louis/libphonenumber-shortcuts)[ Packagist](https://packagist.org/packages/damien-louis/libphonenumber-shortcuts)[ RSS](/packages/damien-louis-libphonenumber-shortcuts/feed)WikiDiscussions main Synced 1mo ago

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

Libphonenumber shortcuts
========================

[](#libphonenumber-shortcuts)

Provide shortcuts to use famous [libphonenumber](https://github.com/giggsey/libphonenumber-for-php) functions most quickly and easily.
Exceptions are voluntarily catched because the goal is to use this only in final context (displaying for example).

### Installation

[](#installation)

```
composer req damien-louis/libphonenumber-shortcuts

```

### Format

[](#format)

Return `string` or `null`If something is invalid (bad number, unknown format or region), result is `null`

```
//06 05 04 03 02
$result = \PhoneNumberShortcuts::format('+33605040302', PhoneNumberShortcuts::NATIONAL);

//+33 6 05 04 03 02
$result = \PhoneNumberShortcuts::format('0605040302', PhoneNumberShortcuts::INTERNATIONAL, 'FR');

```

### Validation

[](#validation)

Return `boolean`

```
//true
$isValid = \PhoneNumberShortcuts::isValid('+33 607080910');

//true
$isValid = \PhoneNumberShortcuts::isValid('+33 607080910', 'FR');

//false
$isValid = \PhoneNumberShortcuts::isValid('+1607080910', 'FR');

```

### Region Code

[](#region-code)

Return `string` or `null`

```
//GB
$result = \PhoneNumberShortcuts::getRegionCodeForNumber('+44 117 496 0123');

//FR
$result = \PhoneNumberShortcuts::getRegionCodeForNumber('+33 1 02 03 04 05');

//US
$result = \PhoneNumberShortcuts::getRegionCodeForNumber('+12135096995');

//null
$result = \PhoneNumberShortcuts::getRegionCodeForNumber('notanumber');

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

Every ~48 days

Total

2

Last Release

835d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/505f3f5fb55ac64db53482f07c5c5a7a8233a181ce915874986cb8e164b21249?d=identicon)[damien-louis](/maintainers/damien-louis)

---

Top Contributors

[![damien-louis](https://avatars.githubusercontent.com/u/72412142?v=4)](https://github.com/damien-louis "damien-louis (9 commits)")

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/damien-louis-libphonenumber-shortcuts/health.svg)

```
[![Health](https://phpackages.com/badges/damien-louis-libphonenumber-shortcuts/health.svg)](https://phpackages.com/packages/damien-louis-libphonenumber-shortcuts)
```

###  Alternatives

[odolbeau/phone-number-bundle

Integrates libphonenumber into your Symfony application

24910.3M11](/packages/odolbeau-phone-number-bundle)[verbb/formie

The most user-friendly forms plugin for Craft.

101372.9k40](/packages/verbb-formie)[log1x/acf-phone-number

A real ACF phone number field.

12072.5k](/packages/log1x-acf-phone-number)[serendipity_hq/component-value-objects

A set of value objects to manage simple and composite values

20558.6k4](/packages/serendipity-hq-component-value-objects)[rynpsc/craft-phone-number

International phone number field.

2265.9k](/packages/rynpsc-craft-phone-number)

PHPackages © 2026

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