$result = '马拉个巴子的'; //文本
$replace = '屁屁'; //替换成
$sensitive = ['巴子','shapi']; //敏感词
$srtWords = array_combine( $result, array_fill( 0, count( $result ), $replace ) );
$result = strtr( $result, $srtWords );
$result = '马拉个巴子的'; //文本
$replace = '屁屁'; //替换成
$sensitive = ['巴子','shapi']; //敏感词
$srtWords = array_combine( $result, array_fill( 0, count( $result ), $replace ) );
$result = strtr( $result, $srtWords );