Should you update to PHP 8

Should You Update to PHP 8?

Jerzy Zawadzki - Chief Technology Officer
3 minutes read

2021 will be an exciting year for PHP developers and applications. PHP 8 released in 2020, marking the next major update of the PHP language. After 5 years of well-loved PHP 7.0 versions, the latest update contains many new features, performance improvements, and will most likely introduce breaking changes.

This all begs the question: Should you update to PHP 8, or is it better to wait? Let’s take a quick look at what the latest update contains, and what you should consider before updating.

Want to dive deeper into upgrade process?

Get our eBook - How to Upgrade Your Business to PHP 8

What’s New in PHP 8

While the update does not introduce revolutionary changes in the language, there’s a lot of great stuff in PHP 8 (which you can download here). There are many changes, including named arguments, union types, attributes, constructor property promotion, match expressions, throw expressions, null safe operator, JIT, and improvements in the type system, error handling, and consistency—just to name a few! Head over to the official PHP 8.0 Upgrade Notes for a list of all changes.

On the language front, there are two changes in PHP 8 which deserve special attention:

  • JIT - The Just in Time (JIT) compiler promises to speed up more complex, longer-running scripts. Currently, it can improve code execution performance and will expand and improve over time, as more people tinker with it.
  • Tidy comparison operator - Better comparisons will get rid of frequent bugs and unexpected behaviors that often plague PHP developers. Comparisons between numbers and non-numeric strings now work. Thank goodness!

Should you update now to PHP 8?

The short and sweet answer is ‘Yes.’ 

This is universally true, at least in the world of PHP development. Applications that run on the latest versions of both PHP—and their supporting frameworks and libraries—make it possible to develop new features and maintain the codebase more efficiently. 

Need help with updating to PHP 8?

Sign up for a free consultation 👇

Light BulbRegular expert articles and reports
LaptopTechnology industry tips and trends
StarKeep track of our latest awards

How easy is it to update to PHP 8?

Do your frameworks and libraries support PHP 8? If so, updating should be straightforward. Nearly all the major, popular frameworks now have PHP 8 support enabled.

We’re only a few months behind the new release, so some 3rd party dependencies are still catching up on compatibility and fixes intended for their developers. For instance, legacy PHP codebases, like WordPress, will still run into compatibility issues. 

Lesser-known libraries and packages may be less friendly as well. In this case, each one will have to be updated before proceeding. If you can’t upgrade to PHP 8.0 because of your dependencies, we encourage you to support open-source activities, whether in their development or even in feedback to those who create them. You can always ask or check their Twitter account to get the latest news on their support roadmap for PHP 8.

How much time do you have?

This depends on your current PHP version in use. 

The release of PHP 8 coincides with support ending for versions 7.1 and 7.2. Version 7.3 has now entered the Security Support period, which means it will only receive security fixes. If your application uses any of the above versions (or, horror of horrors, earlier ones) you should prioritize a roadmap for upgrading to PHP 8 immediately! 

If you are on PHP 7.4.x, you still have a whole year to update without worrying about version support. Of course, this means you still won’t have access to the latest features available in PHP 8.0.

Polcode is on PHP 8!

Our first internal application has already been updated to PHP 8 in production. Our projects keep up with the latest releases, so migrating was simple and easy, as most of the breaking changes were deprecated before the 7.x versions. We’re also in the process of migrating a few of our clients to the new version.

If you’re on 7.4.x, the migration guide has all the documentation you need. This resource also contains all of the new features and backward-incompatible changes that you’ll have to look out for when migrating versions. 

Let us know how your update goes. Don’t wait too long!

Get our eBook - How to Upgrade Your Business to PHP 8

On-demand webinar: Moving Forward From Legacy Systems

We’ll walk you through how to think about an upgrade, refactor, or migration project to your codebase. By the end of this webinar, you’ll have a step-by-step plan to move away from the legacy system.

Watch recording
moving forward from legacy systems - webinar

Latest blog posts

See more

Ready to talk about your project?


Tell us more

Fill out a quick form describing your needs. You can always add details later on and we’ll reply within a day!


Strategic Planning

We go through recommended tools, technologies and frameworks that best fit the challenges you face.


Workshop Kickoff

Once we arrange the formalities, you can meet your Polcode team members and we’ll begin developing your next project.