<?php
//方法一:
$str="要显示一个目录树及其每个子树的磁盘使用情况";
print_r(join("",array_reverse(preg_split("//u",$str))));
echo "</br>";
//方法二:
$str = ".tcejbo ecafretnIresU a nruter tsum redivorp resu ehT ";
$len = mb_strlen($str,"utf8");
$restr = "";
for($i=$len-1;$i>=0;$i--){
$restr .=mb_substr($str,$i,1,"utf8");
}
echo $restr ;
?>
<script type="text/javascript">
var strs = '20171127';
var news = strs.split('').reverse('');
console.log(news);
</script>