php过滤字符串中的emoji表情

function filterEmoji($str=''){
    $str = json_encode($str);
    $str = json_decode(preg_replace("#(\\\ud[0-9a-f]{3})#i", "", $str));
    return $str;
}
发布了120 篇原创文章 · 获赞 433 · 访问量 20万+

猜你喜欢

转载自blog.csdn.net/msllws/article/details/104743632