php把手机号中间4位变成星号 function telsubstr($tel) { $telstart = substr($tel,0,3); $telend = substr($tel,7,4); return $telstart.'****'.$telend; } $tel = '15823458976'; echo telsubstr($tel);//显示结果为:158****8976 赞 0 赏 分享