Reverses a UTF-8 string. This is a UTF8-aware version of strrev.
$str = UTF8::strrev($str);
string Core_UTF8::strrev( string $str )
参数列表
参数 类型 描述 默认值 $str
string
String to be reversed
string
public static function strrev($str)
{
if ( UTF8::is_ascii($str) ) return strrev($str);
preg_match_all('/./us', $str, $matches);
return implode('', array_reverse($matches[0]));
}