I'm looking for PHP Optimization tips. Coding practices and other methodologies which will make my PHP execute faster.One tip per answer, please, and include why it makes the code faster!
There are no optimization tips we can provided. Optimizing an application is depended on the application. In either case you need to profile your code. See: https://en.wikipedia.org/wiki/Profiling_(computer_programming)
After that, use your favorite search engine for resource concerning PHP and profiling.
The best results for optimising your application are usually seen with well written code; so refactoring your PHP is a good place to start. A more generalised method would be to cache the opcode with the likes of APC (a PECL extension).
This topic is now closed. New replies are no longer allowed.