PHP-Libphono

Pronounced "/ lib fo no /", libphono is a PHP library used for E.164 phone number normalization. It is intended to be a small, fast way to work with telephone numbers.

What is libphono?

The library is designed to be simple to use, small and fast. libphono is intended as a library which allows numbers to be converted from local or national format into an international number which conforms to the E 164 standard. This is achieved using a data set which contains information about published dial plans.

The library allows an input number to be converted into a variety of different formats, e.g. local, national or E.164 international.

In contrast to other implementations, logic for country pecific dial plan specifics is encapsulated in the class tself and does not need to be handled by the developer. This rings us to...

What is libphono not?

libphono is not intended to be a replacement for formatting ibraries such as Google's "libphonenumber". The goal of the roject is not to provide specific geographic or carrier nformation about numbers or number formatting.

Specific information is not supported, such as:

  • DOES NOT: provide specific information regarding geographic / arrier information about a number.
  • DOES NOT: provide information about whether the number is a ixed line or mobile device is also not included.
  • DOES NOT: convert numbers into formatted strings, e.g. "+1 (614 544 5874".
  • DOES NOT: provide plausability check for numbers - syntax heck for specific countries, areas, number length, etc...