PHP code example of silotech / validate-sl-number
1. Go to this page and download the library: Download silotech/validate-sl-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/ */
silotech / validate-sl-number example snippets
ne = "0023273111222";
$result = isPhoneNumberAValidSLNumber($phone);
if ($result !== false) {
echo "Valid SL Number: " . $result;
} else {
echo "Invalid SL Number";
}
isPhoneNumberAValidSLNumber(string $phone_number): bool|string
isPhoneNumberAValidSLNumber("+23273111222"); // "+23273111222"
isPhoneNumberAValidSLNumber("0023232111222"); // "+23232111222"
isPhoneNumberAValidSLNumber("033111222"); // "+23233111222"
isPhoneNumberAValidSLNumber("070111222"); // false