PHP code example of cherif / algerian-mobile-phone-number
1. Go to this page and download the library: Download cherif/algerian-mobile-phone-number library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cherif / algerian-mobile-phone-number example snippets
use Cherif\AlgerianMobilePhoneNumber\AlgerianMobilePhoneNumber;
$phoneNumber = AlgerianMobilePhoneNumber::fromString('0699000000');
use Cherif\AlgerianMobilePhoneNumber\AlgerianMobilePhoneNumber;
$phoneNumber = AlgerianMobilePhoneNumber::fromString('06 99 00 00 00');
use Cherif\AlgerianMobilePhoneNumber\AlgerianMobilePhoneNumber;
$phoneNumber = AlgerianMobilePhoneNumber::fromString('06-99-00-00-00'); //
use Cherif\AlgerianMobilePhoneNumber\AlgerianMobilePhoneNumber;
$phoneNumber = AlgerianMobilePhoneNumber::fromString('06-99-00-00-00');
$phoneNumber->withNumber('07-99-00-00-00'); // Will return a new instance that represents the new number