function strrev_utf8($str){ return join("",array_reverse(preg_split("//u", $str))); } $str = "12345"; echo strrev_utf8($str);