function strrev($str) { preg_match_all('/./us', $str, $parts); return implode('', array_reverse($parts[0])); }