$mobile = 13500000000; $preg = "/^13[0-9]{1}[0-9]{8}$|15[0-9]{1}[0-9]{8}$|18[0-9]{1}[0-9]{8}$/"; if(preg_match($preg,$mobile)){ return true; }else{ return false; }