BreadcrumbHomeResourcesBlog Upgrade PHP 8.0: Paths and Considerations September 19, 2023 Upgrade PHP 8.0: Paths and ConsiderationsModernizationBy Matthew Weier O’PhinneyWith 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 choosing to upgrade PHP 8, including why it's important, considerations when performing a PHP 8.0 upgrade, and alternative options for teams not quite ready to upgrade.Table of ContentsWhy Upgrade PHP 8.0?PHP 8 ChangesPHP 8.0 Upgrade Paths and ConsiderationsPHP 8 Upgrade AlternativesFinal ThoughtsTable of Contents1 - Why Upgrade PHP 8.0?2 - PHP 8 Changes3 - PHP 8.0 Upgrade Paths and Considerations4 - PHP 8 Upgrade Alternatives5 - Final ThoughtsBack to topWhy 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. PHP 8 changes from version to version, and it is important to use the most up-to-date iteration.Back to topPHP 8 ChangesSecurityPHP 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 ImprovementsOne 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 CompatibilityEach year, we detail the improvements and changes in new versions, and you can see these when visiting our PHP 8 hub. Key features and PHP 8 changes 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 PHP 8 changes; 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 topPHP 8.0 Upgrade Paths and ConsiderationsThe 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:8.0 >> 8.18.1 >> 8.2Need Help to Upgrade PHP 8?Get help from our PHP experts. Learn more about our industry-leading PHP upgrade and migration services via the link below.Explore Our ServicesBack to topPHP 8 Upgrade AlternativesFor those unable to upgrade PHP 8 (or other EOL PHP versions) there are alternative options available, including self-support and commercial long-term support.Self-SupportFor 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 SupportFor 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 NothingWhile 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 topFinal ThoughtsWhile 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 OptionsWhether 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 ServicesAdditional ResourcesOn-Demand Webinar - Navigating PHP 8.0 End of LIfe and Exploring PHP 8.3Resource Hub - Comparing PHP VersionsSolutions - PHP Hosting Providers SolutionsBlog - Changes to Watch in PHP 8.3Blog - Are You Ready for PHP 8.0 EOL?Blog - Upgrading to PHP 8.2White Paper - The Hidden Costs of PHP UpgradesWhite Paper - Planning Your Next PHP MigrationBlog - PHP Migrations: When Is Migrating the Right Choice?Case Study - Zend Performs Bark.com PHP MigrationBack to top
Matthew Weier O’Phinney Senior Product Manager, OpenLogic and Zend by Perforce Matthew began developing on Zend Framework (ZF) before its first public release, and led the project for Zend from 2009 through 2019. He is a founding member of the PHP Framework Interop Group (PHP-FIG), which creates and promotes standards for the PHP ecosystem — and is serving his second elected term on the PHP-FIG Core Committee.