php 截取字符串 strstr 和strrchr

截取字符串 strstr 和strrchr

结果:(其中之一)

strstr : 执行时间在0.10 - 0.19 之间

strrchr : 执行时间在0.095 - 0.19 之间

结论:从数十次执行结果来看strrchr多数情况下执行时间小于strstr且更稳定

原文地址:https://www.cnblogs.com/peipeiyu/p/11532612.html