1 <?php
2 /**
3 * @package utf8
4 */
5
6 //---------------------------------------------------------------
7 /**
8 * UTF-8 aware alternative to strrev
9 * Reverse a string
10 * @param string UTF-8 encoded
11 * @return string characters in string reverses
12 * @see http://www.php.net/strrev
13 * @package utf8
14 */
15 function utf8_strrev($str){
16 preg_match_all('/./us', $str, $ar);
17 return join('',array_reverse($ar[0]));
18 }
19
20