1 function is_telephone($phone){ 2 $chars = "/^13[0-9]{1}[0-9]{8}$|15[0-9]{1}[0-9]{8}$|18[0-9]{1}[0-9]{8}$/"; 3 if (preg_match($chars, $phone)){ 4 return true; 5 } 6 }
2022-06-06 09:05:32
1 function is_telephone($phone){ 2 $chars = "/^13[0-9]{1}[0-9]{8}$|15[0-9]{1}[0-9]{8}$|18[0-9]{1}[0-9]{8}$/"; 3 if (preg_match($chars, $phone)){ 4 return true; 5 } 6 }