php验证手机号码

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 }

 

posted @ 2014-03-29 10:24  thekingofreturn  阅读(208)  评论(0编辑  收藏  举报