php正则匹配验证手机号

$ismobile=preg_match("/(^[0-9]{3,4}\-[0-9]{3,8}$)|(^[0-9]{7,8}$)|(^\([0-9]{3,4}\)[0-9]{3,8}$)|(^0{0,1}1[0-9]{10}$)/",$tel);
if($tel == "" || !$ismobile){
echo "请输入正确的手机号";
exit;
}

posted @ 2016-04-13 10:52  叨叨的蜗牛  阅读(234)  评论(0编辑  收藏  举报