过滤字符串中的表情

$str = preg_replace_callback('/./u',function (array $match) {
return strlen($match[0]) >= 4 ? '' : $match[0];
}, $str);

 

posted @ 2019-11-08 10:12  cc_forever  阅读(371)  评论(0)    收藏  举报