Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * le numéro de téléphone commence t-il par 06 ou 07 ?
- * @param type $telephone
- * @return boolean
- */
- public static function isTelephonePortable($telephone){
- if(filter_var((int)$telephone, FILTER_VALIDATE_INT) === false){
- return false;
- }
- if(substr($telephone, 0, 2) === '06' || substr($telephone, 0, 2) === '07'){
- return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement