PHP将emoji表情进行过滤
时间:2021-09-02 16:39:48
收藏:0
阅读:25
// 过滤掉emoji表情
function filterEmoji($str) { $str = preg_replace_callback( ‘/./u‘, function (array $match) { return strlen($match[0]) >= 4 ? ‘‘ : $match[0]; }, $str); return $str; }
原文:https://www.cnblogs.com/duye520/p/15218017.html
评论(0)