<?php $str="123456a"; $str_a=123456"; if(is_numeric($str)){ 返回 false }else{ 返回 true } strlen($str) //返回 7 ?>