Building large strings in PHP
Note to PHP programmers: It turns out it's much faster to build large strings from many smaller strings by concatenating them onto one string than it is to append to an array repeatedly and then join that array into a string. I timed it and was surprised by the results.
I am not too surprised at this. I find myself using arrays for this when I need to join(', ', $array). It's lazy, but it works.




