I have been into PHP for a while, and I often wonder if my programming style slows down PHP. Regardless of which programming/script language used, there are always coding practices which you can adhere to that would improve and optimize the performance of the program/website.
I have compiled a list specific to PHP, feel free to comment and let me know if any of these are in any way incorrect or if I have missed out some important details!
The benchmarks are (unless otherwise stated) 100,000 repetitions, and the execution time monitored, then repeat this procedure further 100 times to get a mean (average) result. Results are in seconds.
I realise that this is not the best way to benchmark some of these things, however the information provided is only as reference and useful information, much of coding decisions depend on specific development situations. Benchmarks area always not 100% accurate, but these should give you some ideas.
Read the rest of this entry »