Use the Zend Optimizer for older PHP versions

If you're stuck using PHP 5.4 or earlier, the Zend Optimizer is a free product that automagically helps your PHP code go faster.

It does so by performing actual code optimisation for you - changing things around (but leaving the "meaning" of the code the same) to increase execution speed. Even though it runs every time your page is executed, it has little to no noticeable overhead, and can improve performance a little.

Note that there are some cases where using the Optimizer will actually slow things down - usually when scripts are short, and/or exit early. These situations are rare, though, and you need not let this stop you from installing the Optimizer.

 

Want to learn PHP 7?

Hacking with PHP has been fully updated for PHP 7, and is now available as a downloadable PDF. Get over 1200 pages of hands-on PHP learning today!

If this was helpful, please take a moment to tell others about Hacking with PHP by tweeting about it!

Next chapter: Use a PHP code cache for newer PHP versions >>

Previous chapter: Use some functions carefully for maximum performance

Jump to:

 

Home: Table of Contents

Copyright ©2015 Paul Hudson. Follow me: @twostraws.