PHP rtrim函数bug
测试代码:
<?php $str = rtrim('article_list.html', '.html'); echo $str; echo '<br />'; $str = rtrim('article_index.html', '.html'); echo $str; echo '<br />'; $str = rtrim('articleABCT.html', '.html'); echo $str; echo '<br />'; ?>
显示结果:
article_lis
article_index
articleABCT
测试环境:
WINNT Apache/2.2.16 (Win32) PHP/5.2.14(本地PHPnow 1.5.6-1)
Linux Apache 2.0 PHP/5.2.17p1(wdcp_v2.5.7)
Linux LiteSpeed PHP/5.2.17(梦游主机)
Linux Apache 2.0 PHP/5.2.17(主机无忧)