PHP 检测是否手机号


/**
 * 检查手机号
 * @param $mobile
 * @return bool
 */
private function is_mobile($mobile){
    if(preg_match('/^1[345789]\d{9}$/ims',$mobile)){
        return true;
    }else{
        return false;
    }
}

Leave A Comment

Please be polite. We appreciate that. Your email address will not be published and required fields are marked