decorative image for blog on php 8.0 upgrades
September 19, 2023

Upgrading PHP 8.0: Upgrade Paths and Considerations

Modernization

With PHP 8.0 reaching end of life in November, organizations around the world are planning and/or executing upgrades to PHP 8.1, PHP 8.2, or PHP 8.3. In this blog, we look at the considerations teams need to make when upgrading PHP 8.0, including why it's important, considerations when performing a PHP 8.0 upgrade, and alternative options for teams not quite ready to upgrade.

Back to top

Why Upgrade PHP 8.0?

While there are a number of reasons to upgrade off an end of life PHP version, the most common reason is to maintain community support – and the CVE patches and bug fixes that come with it.

Security

PHP 8.0 reaches end of life on November 30, 2023. This means that any CVEs that occur past that point in time will not be patched by the community.

For teams running PHP 8.0 or previous PHP versions in production, that means exposure to vulnerabilities, which means the risk of exploit and breach of the overarching web application. That’s why, if possible, it’s best to update to a community supported PHP version or find an alternate means of patching your end of life PHP. 

Performance Improvements

One feature we’ve come to expect from new PHP versions is improved performance, and this is true with 8.1 and 8.2. The base benchmarks between 8.0 and 8.1 demonstrated a 5-8% improvement, while WordPress users can expect around 47% improvement!

On top of this, the Just-In-Time (JIT) compiler support was extended to the ARM architecture starting in 8.1, which means if you are deploying your PHP applications on ARM machines, you can now benefit from the performance improvements JIT can provide.

All of these factors mean that upgrading to a more recent PHP 8 release will save your company money, as you’ll be able to respond to the same number of requests with reduced hardware requirements, or respond to more requests using the hardware you already have. 

New Features, Improvements, and Compatibility

New Features, Improvements, and Compatibility

Each year, we detail the improvements and changes in new versions, and you can see these when visiting our PHP 8 hub. Key features in PHP 8.1 and 8.2 you might want to consider:

  • Fiber Support — If you develop async PHP applications, or plan to do so, Fibers were introduced in PHP 8.1, providing a native,language-level solution to async programming.
  • Enums — PHP added native Enum support in PHP 8.1.
  • Intersection and DNF Types — PHP added native intersection types in PHP 8.1, allowing developers to indicate that a value must satisfy multiple interfaces to be valid. 8.2 added DNF types, allowing you to combined union and intersection types in parameter and return type declarations.
  • Readonly Classes — Readonly classes were introduced in PHP 8.2.
  • SensitiveParameter Attribute — PHP 8.2 provides the “SensitiveParameter” attribute, allowing you to mark function parameters as sensitive, preventing their values from showing up in stack traces.

And this is only a short list of notable features; the releases provide dozens of new features and improvements that could impact and improve your applications. For those of you considering upgrading to PHP 8.3, be sure to check out my blog on the upcoming features, improvements, and deprecations in PHP 8.3.

Back to top

PHP 8.0 Upgrade Paths and Considerations

The most popular upgrade paths for teams using PHP 8.0 will be migrating PHP 8.0 to PHP 8.1 or PHP 8.2. Between PHP 8.1 and 8.2, upgrading from 8.0 to 8.2 will likely be the most popular option (due to the longer support runway). Once PHP 8.3 becomes available in November, 2023, we’ll see 8.3 become a popular option as well.

Upgrading PHP 8.0 to 8.1, 8.2, or 8.3 

The differences between upgrading PHP 8.0 to 8.1, 8.2, or 8.3 should be similar. However, with each version you should carefully read the migration guide shipped in the PHP manual, and be aware of how deprecations can impact your application.

Generally speaking, when upgrading within the same major version, you should be able to jump directly to your target version. However, if you do, make sure that you review the migration notes for all versions in between as well.

You can get an overview of the changes to watch when upgrading to PHP 8.2 here.

To get started, be sure to check out the migration documentation on PHP.net below:

Need Help Upgrading Your PHP Version?

Get help from our PHP experts. Learn more about our industry-leading PHP upgrade and migration services via the link below.

Explore Our Services

Back to top

PHP 8 Upgrade Alternatives

For those unable to upgrade off PHP 8.0 (or other EOL PHP versions) there are alternative options available, including self-support and commercial long-term support.

Self-Support

For organizations that have an abundance of staff possessing the unique skills necessary to backport PHP patches then build and deploy PHP to their applications, self-support may be a viable option. For those considering self-support, be sure to carefully consider the costs of building PHP in house and whether migrating or buying LTS will be a more cost-effective option.

Read our white paper on the Hidden Costs of Building PHP In-House >>

PHP Long-Term Support

For some organizations, upgrading off PHP 8.0 on the community timeline might not make sense. That can be especially true when those organizations have recently completed a migration, and the costs of upgrading outweigh the benefits. For those organizations, commercial PHP long-term support is a popular option.

See Our PHP LTS Options >> 

Do Nothing

While not recommended, and not possible for many companies with internal or external compliance requirements, many companies will ultimately choose to deploy unsupported PHP to their production applications.

This can be for a variety of reasons, but ultimately the end result is the same: organizations that deploy unsupported PHP in production are exposing themselves to potentially devastating CVEs.

Back to top

Final Thoughts

While upgrading PHP 8.0 to a community-supported PHP version with a longer support lifecycle shouldn't be as difficult as the major version migration that preceded it for most applications, there are still a number of features, improvements, and deprecations that will require consideration as you plan and execute your upgrade.

Explore Our LTS and Professional Services Options

Whether you're upgrading to a new PHP version, or need to stay on an EOL PHP version a bit longer, Zend can help. Learn more about how we can help your team via the links below.

See PHP LTS Options  Explore Migration Services

Additional Resources

Back to top