Keep up to date

If you are not using it already, consider upgrading to the latest version of PHP. Fixes and tweaks to slow code are being made to all the time, so it is worth taking advantage of all the hard work going on. Note that as the fix to many PHP bugs is "upgrade to the latest version", this is generally always the best option - if you are running anything older than 5.6, upgrade; if you are on anything before 5.4, upgrade right now; if you are on anything before 5.2, what's taking you so long? Use the phpinfo() function to get your version number and information about activated modules.

Do keep one thing in mind, however: the early bird may get the worm, but the second mouse gets the cheese. That is, don't feel obliged to update to the latest version of PHP just because it is new - let others try it out and find any obvious errors before you upgrade.


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: Cache array data >>

Previous chapter: Listen to all errors, big and small

Jump to:


Home: Table of Contents

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