/** *翻转utf格式的字符串,使用正则和数组实现 *@param string $str *@return string */ function strrvev_utf8($str){ return join("," , array_reverse(preg_split("//u" , $str))); } $str = "博客园"; echo strrev_utf8($str); //园客博
/** *翻转utf格式的字符串,使用正则和数组实现 *@param string $str *@return string */ function strrvev_utf8($str){ return join("," , array_reverse(preg_split("//u" , $str))); } $str = "博客园"; echo strrev_utf8($str); //园客博
转载于:https://www.cnblogs.com/zwtqf/p/9909347.html