function u2c($str){   
    return preg_replace_callback("#\\\u([0-9a-f]{4})#i",      
    function ($r) {
        return iconv('UCS-2BE', 'UTF-8', pack('H4', $r[1]));},$str);
}

echo u2c('\u53ea\u80fd\u4e2d\u6587\u624d\u61c2\u6211');

 

 

 posted on 2022-10-24 11:51  boye169  阅读(159)  评论(0编辑  收藏  举报