Chapter 3. PHP Code Optimization

Opcode caching, data caching using Memcached, and optimizing your database are all great optimization tricks you will learn once you're done with this book. But before reaching those chapters, we need to learn how to apply the best coding practices. Knowing when to use a specific PHP function over another and making small incremental changes in your code can change the performance of your PHP code.

In previous chapters, we focused on the tools to optimize the rendering of content and reduce the amount of data the user was required to download, using Firebug, Page Speed, and YSlow. In many cases, optimizing the response and the content returned to the user is enough to make most of your users happy. More than often, ...

Get Pro PHP Application Performance Tuning PHP Web Projects for Maximum Performance now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.