function DetectionMobile($mobile) {
   $ReDetection = false;
   $ReDetection = !($mobile == "" || is_null($mobile) || count($mobile)== 0);if(!$ReDetection) return false;
   $ReDetection = preg_match("/^0(([1-9]d)|([3-9]d{2}))d{8}$/",$mobile);if($ReDetection) return true;
   $ReDetection = preg_match("/^1[3,5]d{9}$/",$mobile); return true;  //这里写错了,改一下
   return $ReDetection;
}if (DetectionMobile(15100000000)) echo '符合规则';
else echo '不符合';