php替换手机号中间四位数

/*
 *替换手机号码中间四位数字
 *@param [type] $str [description]
 *@return [type] [description]
*/
function hide_phone($str){
    $resstr = substr_replace($str,'***',3,4);
    return $resstr;
}

 

posted @ 2020-11-17 11:35  潘潘潘的博客  阅读(340)  评论(0编辑  收藏  举报