Premature optimization is the root of all evil
There’s loads of ways you can optimize your PHP code, however they are probably NOT the answer to your performance issues.
A wiser man than myself once said:
We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.
This was originally said by Donald Knuth, the father of the analysis of algorithms.
This can also be applied when working with programming languages such as PHP.
Here’s some handy performance tips to point you in the right direction…