strrchr() 函数返回结果有时不对?
adoms 2014-08-03 02:35:36 手册上的经典例子:
echo strrchr("Hello world!","world");
输出为:world!
但继续尝试会发现这些奇葩结果:
echo strrchr("Hello aaaaworld!","aaaaworld");
输出:aworld!
echo strrchr("Hello cacworld!","cacworld");
输出:cworld!
echo strrchr("abc123cache123","cache");
输出:che123
echo strrchr("cache","cache");
输出:che
等等,总之是会返回不全,总是缺前面几个字符,不知为何??