php怎么实现过滤手机自带的Emoji表情
// 过滤掉emoji表情
public function filterEmoji($str){
$str = preg_replace_callback('/./u',function(array $match){
return strlen($match[0]) >= 4 ? '' : $match[0];
},$str);
return $str;
} $content=$this->filterEmoji($content);
if(empty($content)){$content='..';}
上一篇:php基础_字符函数or运算符号