PHP echo efficieny comparision
Is PHP echo $str1, $str2, $str3
faster than echo $str1 . $str2 . $str3
开发者_如何学JAVA?
Yes, but only marginally so, and probably won't impact your web application. Here's one of the many articles that runs through the benchmarks.
The result shows that dot is more preferable if there are no variables or $ symbol involved which is around 200% faster. On the other hand, commas will help to increase around 20%-35% efficiency when dealing with $ symbols.
source
精彩评论