TL;DR
- Sort every PHP application before choosing a strategy. Each one is a runtime bump, a runtime plus framework upgrade, or a rearchitect, and one strategy for the whole estate overpays for some and underestimates others.
- Plan the PHP version and the framework as one upgrade. Older Laravel, Symfony, and CodeIgniter releases don’t run on current PHP, so a runtime upgrade usually forces a framework upgrade.
- Pick the target version by support runway. PHP 8.5 is supported until December 31, 2029, a year longer than PHP 8.4, and PHP 8.6, released November 19, 2026, runs to December 31, 2030. Until your framework supports 8.6, PHP 8.5 is the practical pick.
- Rearchitect to Java or .NET only when the architecture is the problem. An old PHP version on its own is a reason to upgrade.
- Prove equivalence before cutover, with or without tests. Record real inputs, replay them against the old and new application, and compare the outputs with checksums.
PHP End-of-Life Dates for Every Version
PHP migration is the work of moving a PHP application off an unsupported version of PHP, either by upgrading it to a supported release or by rearchitecting it onto another platform. This guide covers that application-level decision, from a PHP 8 migration within PHP to a move onto Java or .NET, and it is separate from database schema migrations.
Every PHP release gets a fixed support window from the PHP project. Once security support ends, flaws found in that version stay unfixed [1][2].
| PHP version | Security support ends |
| 7.4 | Ended November 28, 2022 |
| 8.0 | Ended November 26, 2023 |
| 8.1 | Ended December 31, 2025 |
| 8.2 | December 31, 2026 |
| 8.3 | December 31, 2027 |
| 8.4 | December 31, 2028 |
| 8.5 | December 31, 2029 |
| 8.6 | December 31, 2030 |
Teams usually start further back than they’d like. As of October 2026, over a third of websites running PHP are on PHP 7 or older, and PHP 7.4 alone accounts for nearly three-quarters of the PHP 7 sites [3].
That makes every PHP application a migration project on a timer. The variable is how much runway the next version buys.
Why PHP Migration Is Urgent: PHP2Shell and PHP 8.2 End of Life
In October 2026, researchers using frontier AI models disclosed PHP2Shell, two critical flaws in the PHP engine rated CVSS 9.2 [4]. Fixes shipped in PHP 8.5.12, 8.4.27, 8.3.36, and 8.2.35, and PHP 8.1 and older received no official fix. A further release on November 19, 2026 (8.5.13, 8.4.28, 8.3.37, and 8.2.36, alongside PHP 8.6.0) fixed seven more critical flaws [8][9].
Exploitation attempts were observed before the flaws were disclosed. On December 31, 2026, PHP 8.2 joins the unsupported list and puts the teams that patched it in the same position.
Patching these two flaws is only part of the picture. A PHP release that has lost support keeps every vulnerability found since, and that list grows with each disclosure. A current supported version starts without that backlog and keeps receiving fixes, so moving up makes the application more secure overall, not just safe from PHP2Shell.
The exposure itself and the immediate steps are covered in what PHP2Shell means for unsupported PHP. The patch question has an answer, and the question that remains is how to get each application onto supported PHP and keep it there.
What Breaks When You Upgrade From PHP 7.4 to PHP 8
Changing the PHP version in a hosting panel or a container image is the smallest part of a PHP upgrade. Each major release removes or tightens behavior that older code depends on, and the application fails wherever it relied on the old behavior.
PHP Breaking Changes From PHP 7.0 to PHP 8.2
The changes that break legacy applications most often are:
- PHP 7.0 removed the mysql_* functions. Applications still calling them can’t run on PHP 7 or 8 without changes, so any move from PHP 5 to 8 hits this first [5].
- PHP 8.0 removed create_function() and each(). Code that relies on either stops working [6].
- PHP 8.0 tightened type handling. Comparisons such as 0 == “foo” changed result, and many operations that used to warn now throw a TypeError, surfacing errors older code silently tolerated [6].
- PHP 8.2 deprecated dynamic properties. Classes that add properties on the fly now raise deprecation notices [7].
Upgrading PHP Requires a Laravel, Symfony, or CodeIgniter Upgrade
The framework is the second half of the job. Older framework releases don’t run on current PHP, so a runtime upgrade usually forces a framework upgrade, often across several major versions.
Laravel 11 is the first release whose supported PHP range includes PHP 8.4, so a Laravel 6 or 7 application moving to PHP 8.4 needs a Laravel version update alongside it. Upgrading PHP usually means a Laravel framework upgrade, or the Symfony or CodeIgniter equivalent.
Pinned libraries and abandoned extensions add a third layer, since a package with no PHP 8 release has to be replaced in the application code.
Plan the runtime and the framework as one job. Upgrades stall when the PHP bump finishes and the framework can’t follow, which is technical debt in legacy applications coming due at once.
Three PHP Migration Paths: Upgrade PHP, Upgrade PHP and the Framework, or Rearchitect
Every legacy PHP application falls into one of three categories, and the category decides the path.
| Category | What it looks like | What it takes |
| Runtime bump | Maintained framework release, decent tests, mostly deprecation fixes | Automated upgrade tools may do most of the work |
| Runtime plus framework | The PHP upgrade drags a framework upgrade with it, often across several major versions | A coordinated runtime and framework upgrade |
| Rearchitect | The application’s structure, the team’s skills, or the roadmap make PHP the wrong long-term bet | A move to Java or .NET with a modern UI |
I’ll be direct about the first category. If an application sits on a maintained framework release with tests covering its critical paths, automated upgrade tools can carry most of the work, and it may need no outside help.
CodeIgniter 3 to 4 sits at the far edge of the second category. CodeIgniter’s own upgrade guide calls version 4 a rewrite of the framework that isn’t backward compatible, and that jump can push an application toward the third category.
An enterprise estate usually holds several PHP applications on different versions, each in a different category. I’d sort the whole estate first, because one strategy applied everywhere overpays for the easy applications and underestimates the hard ones.

Sort Your PHP Estate With Evidence From the Code


+moreHow to Upgrade Within PHP and Choose a Target PHP Version
Upgrading within PHP is the right path when the business logic is sound, the team knows PHP, and the goal is supported, maintainable PHP fast.
The work moves the PHP version and the framework together, usually one major version at a time for both. Each step resolves deprecations, updates dependencies, and replaces extensions that no longer load. Whether the job is a PHP 7.4 to 8.3 migration or a move from PHP 8.1 to 8.4, the sequence is the same.
Choose the target version by support runway. Each newer version buys roughly a year more of security support, at the cost of more changes to absorb on the way.
PHP 8.4, 8.5 and 8.6 Support Runway
Between PHP 8.4, 8.5 and 8.6, all supported, PHP 8.6 runs until December 31, 2030, PHP 8.5 until December 31, 2029 and PHP 8.4 until December 31, 2028. Each extra year costs more changes to absorb, and for an application that will be hard to touch again, I’d take the year. For most teams that means PHP 8.5 today, since framework support for 8.6 is still arriving, so check yours before choosing 8.6.
When to Migrate From PHP to Java or .NET
I wouldn’t rearchitect a PHP application to escape an end-of-life date. Modern PHP is a capable platform, and when the main problem is an old version, upgrading is faster and cheaper.
Rearchitecting earns its cost under four conditions:
- The business logic is tangled into the PHP. Upgrading would mean rewriting much of it anyway, the classic case for tightly coupled application modernization.
- The roadmap needs what the architecture can’t support. Scale, integration, and AI features are the usual triggers.
- The organization standardizes on Java or .NET.
- PHP talent is hard to retain.
Rearchitecting takes longer, so the existing application stays exposed for the length of the work. Bridge that window with the stopgaps in the PHP2Shell response plan, then move in increments.
The strangler pattern replaces parts of the application behind the running system, so it stays live as each piece moves. That is the core of incremental modernization, and it avoids a big-bang cutover.
Moving the Backend to Java or .NET and the Frontend to React or Angular
Legacyleap’s rearchitecting path targets Java 25 or .NET 10 on the backend, with React or Angular for the UI. The backend work follows the same patterns as any enterprise Java migration or .NET migration.
The frontend is the other half. Legacy PHP applications usually render pages on the server, with HTML, business logic, and database calls mixed in the same files.
Rearchitecting pulls those apart. The logic moves into backend APIs, and every screen is rebuilt in React or Angular against them, which makes the UI a workstream of its own in any frontend modernization plan. In a strangler rollout, screens move to the new UI in groups, and the PHP application keeps serving the rest until each group is live.
PHP Migration Decision Table: Upgrade or Rearchitect
I score each application against seven factors. No single factor decides.
| Factor | Leans upgrade within PHP | Leans rearchitect to Java or .NET |
| How far behind the PHP version is | Any distance, when the architecture is sound | Far behind and paired with tangled logic |
| Framework upgrade path | A supported upgrade path exists | Homegrown framework or no supported path |
| Test coverage on critical paths | Good coverage lets automated tools do more | No direct lean; low coverage raises the cost of both paths |
| Business logic entanglement | Logic separated from the UI and data layers | Logic tangled across the UI, data, and PHP specifics |
| Team skills and hiring | The team knows PHP and hiring is steady | The organization standardizes on Java or .NET, or PHP talent is hard to retain |
| Roadmap needs | The roadmap fits the current architecture | The roadmap needs scale, integration, or AI features the architecture can’t support |
| Time-to-safety | The application can’t tolerate a long exposure window | Stopgaps can protect the application through a longer program |
Read the table as a balance. Tangled logic plus a demanding roadmap is the strongest rearchitect signal, and an old PHP version on its own is not one.
The same weighing sits behind any refactoring versus replatforming decision, applied here with security runway as an explicit input.
How to Test a PHP Migration Without an Existing Test Suite
Every upgrade guide says to run the test suite before and after. Legacy PHP applications usually have little or no test coverage, and writing tests by hand first can take longer than the upgrade itself.
Proof can come from the application’s real behavior:
- Record real inputs to the running application.
- Replay them against the old application and the new one.
- Compare the outputs with checksums.
- Keep every test repeatable, so anyone can rerun it.
The result is an evidence pack, a set of proofs of production equivalence that anyone can rerun. It works for both paths, the upgrade within PHP and the rearchitect to Java or .NET.
The value reaches past engineering. Before a switchover, a risk committee, an auditor, or a board wants evidence that the new application behaves like the old one, and a rerunnable evidence pack is that evidence.
Legacyleap bundles parity tests, checksum-based input equivalence, and repeatable, replayable tests into that evidence pack, with 100% functional parity as the bar before deployment. Replay-based checks become the safety net for legacy modernization that a missing test suite can’t provide.

No Test Suite to Prove an Upgrade With?
The $0 Modernization Assessment maps each PHP application’s risk and recommends a path, with equivalence proof built into the plan.
Limits of Automated PHP Upgrade Tools and PHP to Java Converters
Automated upgrade tools are good. For a clean, maintained application with tests, they can carry much of a framework upgrade quickly, and a PHP 7 to 8 migration tool may be all that application needs. If I owned that application, I’d run the tool and keep the budget.
They stop at predictable points:
- Homegrown or heavily customized code that doesn’t match known patterns
- Business logic tangled across layers
- Applications too far behind for a single automated hop
- No tests to confirm the result
- Many applications at once
- No proof of equivalence at the end
The same honesty applies to a PHP to Java converter or a PHP to C# converter. Tools that convert PHP code to Java line by line produce code that compiles and keeps PHP’s structure, in a language built around different patterns, and the output is hard to maintain.
A PHP to Java migration therefore runs as a structured migration that redesigns the application for its target.
How Legacyleap Runs PHP Migration With Upgrade Tooling, Gen AI Agents, and an Evidence Pack
Every limit above traces back to two gaps, code that rules can’t handle and missing proof that the result behaves like the original. Legacyleap’s PHP migration services, delivered on a Gen AI modernization platform built on multi-agent orchestration, close both on either migration path.
For an upgrade within PHP, Legacyleap moves the PHP version and the framework together for Laravel, CodeIgniter, and Symfony applications. For a rearchitect, it moves the application to the Java or .NET backend and the React or Angular UI described earlier.
The work runs in three layers:
- Deterministic upgrade tooling handles the predictable, mechanical changes.
- Gen AI agents handle what rules can’t. The five agents (Assessment, Documentation, Recommendation, Modernization, and QA) carry each application from assessment through validation.
- The evidence pack proves the result before anything ships, using the record-and-replay method described in the testing section.
About 70% of the modernization is automated, with human review governing the rest, and modernization runs 70 to 80% faster. Code never leaves the client’s environment. Legacyleap applies the PHP migration approach alongside other legacy stacks as part of its legacy application modernization services.
PHP Migration Checklist: Six Steps From Inventory to Production
Hand this sequence to your team:
- Inventory every PHP application, its runtime version, and its framework version.
- Sort each application into one of the three categories.
- Choose a target PHP version for each upgrade by support runway.
- Choose a path for each application with the decision table.
- Establish proof of equivalence before anything ships.
- Bridge exposure with stopgaps for as long as the longer paths run, using the PHP2Shell response plan.
Get the PHP Migration Triage Done for You
The $0 Modernization Assessment returns documentation, a risk and complexity heatmap, recommended targets, a timeline estimate, and a modernization plan in 3 to 5 days. It runs inside your environment, with no source code leaving it.
For an application that is exposed today, the $0 Security Assessment maps unresolvable CVEs across the legacy estate.
FAQs
The PHP runtime can jump directly. Stepping the framework and code through intermediate versions keeps each set of breaking changes small enough to find and fix.
CodeIgniter’s own guide treats it as converting the application to a rewritten framework. Price and plan it like a partial rewrite, since the shared framework name hides how much of the application changes.
Both depend on application size, framework distance, and code complexity, so a credible figure comes from an assessment of the code, and the drivers of [application modernization cost](https://www.legacyleap.ai/blog/application-modernization-cost/) apply here too.
Yes, and they should during validation, since replaying the same recorded inputs against both is how equivalence gets proven.
Yes, and a package with no release that supports the target PHP version must be replaced or maintained in-house before the upgrade can finish.
References
[2] PHP, Unsupported Branches.
[3] W3Techs, Usage statistics of PHP (data as of October 23, 2026). w3techs.com/technologies/details/pl-php/7
[4] PHP security advisory, October 21, 2026.
[5] PHP Manual, Backward incompatible changes (PHP 7.0).
[6] PHP Manual, Backward incompatible changes (PHP 8.0).
[7] PHP Manual, Deprecated features (PHP 8.2).
[8] PHP ChangeLog, versions 8.2.36, 8.3.37, 8.4.28, 8.5.13 and 8.6.0 (November 19, 2026).
[9] Orca Security, PHP security release and PHP 8.6 launch (November 19, 2026).






