PHP code example of joemags-apps / zim-phone-utils
1. Go to this page and download the library: Download joemags-apps/zim-phone-utils 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/ */
joemags-apps / zim-phone-utils example snippets
use JoemagsApps\ZimPhoneUtils\Utils;
// Format a phone number
$formattedNumber = Utils::formatPhoneNumber('+263771234567');
// Get the country ISO code
$countryIso = Utils::getCountryIso('+263771234567');
// Get the mobile carrier
$carrier = Utils::getPhoneCarrier('+263771234567');
// Validate a phone number
$request->validate([
'phone' => '