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=‘..‘;}原文:http://xuqin.blog.51cto.com/5183168/1911729