从一个bug谈rtrim
今天遇到一个bug,代码很简单:
<?php$src = '战争片';$result = preg_replace('/片$/', '', $src);echo mb_convert_encoding($result, 'gbk', 'utf-8'),"\n";