PHP Classes


Recommend this page to a friend!
  Classes of Dmitry Mamontov   PHP Phone Number Format Normalizer   Download  
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Phone Number Format Normalizer
Parse and output a phone number in a given format
Author: By
Last change:
Date: 4 years ago
Size: 1,408 bytes


Class file image Download

Latest Stable Version License Total Downloads

Phone Normalizer

Pars, normalizes the phone number and results in a specified format.


  • PHP version >=5.3.3


1) Install composer

2) Follow in the project folder:

composer require dmamontov/phone-normalizer ~1.0.1

In config composer.json your project will be added to the library dmamontov/phone-normalizer, who settled in the folder vendor/. In the absence of a config file or folder with vendors they will be created.

If before your project is not used composer, connect the startup file vendors. To do this, enter the code in the project:

require 'path/to/vendor/autoload.php';

Examples of use

use DmitryMamontov\PhoneNormalizer\PhoneNormalizer;

$n = new PhoneNormalizer;

$phone = $n->normalize('XXXXXXXXXXXXXX');