PHP library for formatting and validating phone numbers.
- Clean mobile phone numbers by removing unwanted characters
- Validate and format local mobile phone numbers
Install the latest version with
$ composer require aliirfaan/mu-phone-number-kit
<?php
require 'vendor/autoload.php';
use Aliirfaan\PhoneNumberKit\MobileNumberKit;
// instantiate class
$mobileNumberKit = new MobileNumberKit();
// use
$localize = $mobileNumberKit->localizeMobileNumber('0023057563628'); // 57563628