BreadcrumbHomeResourcesBlog Setting Your PHP 7.4 Migration Strategy October 4, 2022 Setting Your PHP 7.4 Migration StrategyState of PHPModernizationWith PHP 7.4 now end of life, teams with applications built on PHP 7.4 are quickly planning and executing their migration to a community-supported version. But are there considerations teams need to make when migrating PHP 7.4?In this blog, we look at considerations for teams migrating off PHP 7.4, including backwards compatibility, deprecated features, potential PHP 7.4 to 8 migration paths, and what teams can do if they're not able to migrate before PHP 7.4 reaches end of life.Table of ContentsBefore You Migrate From PHP 7.4Picking the Right PHP 7.4 Migration PathWhat If You Can’t Migrate Before End of Life?Final ThoughtsTable of Contents1 - Before You Migrate From PHP 7.42 - Picking the Right PHP 7.4 Migration Path3 - What If You Can’t Migrate Before End of Life?4 - Final ThoughtsBack to topBefore You Migrate From PHP 7.4Because PHP 7.4 is the terminal release for the PHP 7.x series, migrating PHP 7.4 requires users to migrate to a new major version of PHP, PHP 8. With this jump to a new major version, there is typically an increased number of considerations, including backwards incompatibility, deprecated features, and other changes.Backwards Incompatibility When you migrate to a new major version, the chances of experiencing issues with backwards incompatibility goes up. For teams moving from PHP 7.4 to PHP 8, there is a long list of changes that might impact your applications. They range from changes to the core language, to how objects within the language are treated, to the removal and deprecation of features and functions. You can view the full list of backwards incompatible changes here.Deprecated Features and Other ChangesThere are a number of features that previously appeared in PHP 7.4 that are deprecated in PHP 8. The deprecated features list for PHP 8.0.x can be found here.Any other changes that might impact teams migrating from PHP 7.4 to PHP 8 can be found in the "Other Changes" list.Start Planning Your Next PHP MigrationIn this free white paper, our experts provide insights on the best practices for planning and executing successful PHP migrations and upgrades.Download for FreeBack to topPicking the Right PHP 7.4 Migration PathNow that PHP 8.1 and PHP 8.2 are available, most teams will be migrating from PHP 7.4 directly to 8.1 or 8.2 -- with most leaning toward the latest release.Read our migration services case study with Bark.com >>Migrating PHP 7.4 to 8As noted in our blog covering the new features and improvements in PHP 8.0, there are a number of syntactical improvements that simplify boilerplate, with some very handy expansions to the type systems. The PHP JIT compiler, although a banner feature for the release, probably won't be the reason why teams migrate from PHP 7.4 to 8 or 8.x versions (at least until there are mature libraries and applications that take advantage of it).As noted above, major version changes bring about a number of backward incompatibilities, meaning that teams will need to spend time reviewing their code. Luckily, there are a few tools that can give you a head start when performing your thorough testing, like the PHP Compatibility Coding Standard for PHP CodeSniffer.Read our breakdown of the new features in PHP 8.0 >>Migrating PHP 7.4 to 8.1For teams who want to migrate to the latest version of PHP (as of September 29, 2022), the migration path would typically run from PHP 7.4 directly to PHP 8.1. PHP 8.1 introduced a few new features, changes, and deprecations to watch out for, so be sure to read the full release notes and upgrade notes.As we noted in our blog detailing the new features in PHP 8.1, teams will want to consider PHP 8.1 or 8.2 if they want to take advantage of the improvements to the object model, or the async capabilities of fibers. Teams upgrading to 8.1 will want to watch out for changes to mysqli error mode, and how values are tied to other types when strict types are enabled.Read our breakdown of the big changes in PHP 8.1 >> Migrating PHP 7.4 to 8.2PHP 8.2, now a full general availability release, will be a popular destination for teams migrating off PHP 7.4Teams might consider PHP 8.2 over 8.1 or 8.0 if they are interested in readonly classes, standalone types, or want slightly better performance. If you are considering a move to PHP 8.2, be sure to read the migration notes provided at php.net.Read our breakdown of the changes to watch in PHP 8.2 >>Back to topWhat If You Can’t Migrate Before End of Life?For teams migrating particularly complex or numerous PHP applications, migrating your applications to supported PHP versions before they reach end of life might not always be possible or cost-effective. But that doesn't mean that teams can roll the dice on unsupported PHP in their applications. Teams that use unsupported PHP in production risk exposing their applications and data to unpatched vulnerabilities.To prevent exposure to those vulnerabilities, teams need to have a plan in place for patching vulnerabilities as they arise — whether that's building patches in house, or working with a third party LTS provider like Zend.See our PHP LTS options >>Back to topFinal ThoughtsWith PHP 7.4 reaching end of life at the end of November, teams who haven't already planned a migration need to start planning and execute their migration strategy, or find a way to support their EOL PHP. That said, if it makes business sense for your team to migrate your application(s) onto a newer, supported PHP version, they should. When they do, they are likely to enjoy a number of new features, improvements, and potential cost savings that come with it.See Our PHP LTS and Migration Service OptionsWhether you need to migrate PHP-based applications to a new version, or find extended long-term support to keep your applications safe and secure, Zend can help. See what we offer via the links below.See LTS Options See Migration ServicesAdditional ResourcesWhite Paper - Planning Your Next PHP MigrationWhite Paper - The Hidden Costs of PHP UpgradesCustomer Success Story - Sensational BrainResource Collection - PHP Versions: Performance, Security, and Feature ComparisonsOn-Demand Webinar - Preparing for PHP 8On-Demand Webinar - Exploring JIT Compilation in PHP 8Blog - How to Assess and Prevent PHP VulnerabilitiesBlog - Planning for PHP 7.4 EOLBlog - Exploring the New PHP JIT CompilerBlog - How to Upgrade PHP Blog - PHP Migrations: When Is Migrating the Right Choice?Blog - PHP Trends to Watch in 2023Back to top