Quantcast
Channel: User Armin Ronacher - Stack Overflow
Viewing all articles
Browse latest Browse all 43

Answer by Armin Ronacher for php: output[] w/ join vs $output .=

$
0
0

If joined with implode() or join(), PHP is able to better optimize that. It goes through all strings in your list, calculates the length and allocates the required space and fills the space. In comparison with the ".=" it has to constantly free() and malloc() the space for the string.


Viewing all articles
Browse latest Browse all 43

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>