Ryz Labs/Migrations/PHP 8.2 end of life
Migrations

PHP 8.2 End of Life: Getting to PHP 8.4 Before Dec 31, 2026

PHP 8.2 gets its final security releases this year. Here is how to inventory every 8.2 runtime and jump straight to PHP 8.4 without stalling on 8.3 along the way.

Short answer: PHP 8.2 security support ends on December 31, 2026, after which it gets no fixes. Upgrade to PHP 8.4, supported until December 31, 2028, skipping 8.3, which ends only a year later.

VersionEnd of lifeStatus on November 21, 2026
PHP 8.2December 31, 2026Supported
PHP 8.4December 31, 2028Supported

PHP 8.2 reaches end of life on December 31, 2026, the last day of security support on the official php.net supported versions table. From January 1, 2027 the PHP project ships no further patches for the 8.2 branch, even for critical vulnerabilities. Our recommendation is to skip 8.3 and move directly to PHP 8.4, which keeps security support until December 31, 2028, by testing against both the 8.3 and 8.4 migration guides at once and switching traffic pool by pool, with the 8.2 build held in reserve for rollback.

Key dates

VersionReleasedEnd of lifeStatus on November 21, 2026
PHP 8.2December 8, 2022December 31, 2026Security fixes only, final weeks
PHP 8.3November 23, 2023December 31, 2027Security fixes only since December 31, 2025
PHP 8.4, recommendedNovember 21, 2024December 31, 2028Active support until December 31, 2026

All dates above come from the official php.net calendar, checked November 21, 2026.

PHP's lifecycle has two stages. A branch gets two years of active support, with regular bug and security point releases, then two more years in which only critical security issues are fixed and releases ship as needed. PHP 8.2 has lived in that second stage since the end of 2024, so it has already gone almost two years without ordinary bug fixes. The year-end date removes the last layer.

That timeline also explains why we steer teams past 8.3. It is already security-only and drops off the table on December 31, 2027, so landing there buys roughly a year before the same exercise repeats. PHP 8.4 runs two years longer. PHP 8.5 runs to the end of 2029 and is a fair choice if you can absorb one more set of changes, but with the 8.2 date this close, the smaller jump to 8.4 is the one most teams can finish cleanly.

What end of life means for your systems

php.net is blunt about the end state. Its glossary says users of an end-of-life release "should upgrade as soon as possible," because they may be exposed to unpatched vulnerabilities. Its unsupported branches page adds that older versions may carry bugs and security holes already fixed in newer releases. Concretely, any vulnerability disclosed in the PHP engine or a bundled extension after December 31, 2026 will be patched on 8.3, 8.4 and 8.5, and left open on 8.2.

Your interpreter does not stop working on New Year's Day. What stops is the supply of fixes, and with it your ability to answer "patched" when a new advisory lands.

There is also a governance angle. SOC 2 criterion CC7.1 asks companies to detect and manage vulnerabilities, and a runtime with no upstream patches is hard to square with that, so a written, dated upgrade plan is the artifact you want on file. We cover the broader picture in SOC 2 for AI-assisted codebases. Customer security questionnaires tend to probe the same point in plain terms, asking which language runtimes you run and whether each is still supported by its maintainers. After the year-end date, "PHP 8.2" stops being a comfortable answer.

Find your exposure

PHP versions hide in more places than most teams expect, because the interpreter that serves web traffic, the one that runs cron jobs and the one in CI are often installed separately. Check each layer and write down what you find.

Where 8.2 is declared

What each host really runs

Run php -v on every host and inside every image to capture the exact point release and SAPI. Follow it with php -m to list loaded extensions and php --ini to see which configuration files are parsed. Remember that the command line and FPM can load different ini files, so also capture phpinfo() output from inside the FPM pool, behind an authenticated or internal-only route, to see what web requests actually get.

Code that 8.3 and 8.4 will flag

If you would rather start from a report than a spreadsheet, paste a composer.json, Dockerfile or CI file into our free EOL deadline radar. It returns a dated report that flags PHP 8.2's December 31, 2026 end of life next to every other runtime and database it detects.

What changes in the upgrade

Going from 8.2 to 8.4 means absorbing two sets of release notes. php.net publishes them as "Migrating from PHP 8.2.x to PHP 8.3.x" and "Migrating from PHP 8.3.x to PHP 8.4.x". Read the 8.3 backward-incompatible changes, the 8.4 backward-incompatible changes and the 8.4 deprecations in full; the items below are the ones we see matter most often.

Four extensions move out to PECL

PHP 8.4 removes IMAP, OCI8, PDO_OCI and PSpell from the distribution. php.net says they now live in PECL, with new releases published ad hoc according to demand. If an app reads a mailbox or talks to Oracle through these, you either compile the PECL package into your 8.4 image or replace the dependency. Decide this first; it can block a whole service.

Implicitly nullable parameters are deprecated

Writing a typed parameter with a null default, like T $a = null, used to widen the type silently. On 8.4 it emits a deprecation; the fix is ?T $a = null or T|null $a = null. php.net also notes that when such a parameter sits before a required one, the default must go, since optional-before-required is itself deprecated. In older codebases this is usually the largest single source of new log noise, and it is mechanical to fix.

Error levels and exit() get stricter

8.4 removes the E_STRICT error level and deprecates its constant. Calling trigger_error() with E_USER_ERROR is deprecated in favor of throwing an exception or calling exit(). exit() and die() now act more like functions: they honor strict_types and throw a TypeError on invalid arguments instead of casting them to a string. Recursion during comparison now throws an Error rather than ending the process with a fatal error, which changes what your error handler sees.

Resources become objects

DBA functions now return Dba\Connection objects and ODBC functions return Odbc\Connection and Odbc\Result objects. On SoapClient, the httpurl and sdl properties are objects and typemap is an array. php.net advises replacing is_resource() checks with checks against false, or against null for the SoapClient properties. Code that tested handles with is_resource() will otherwise take the wrong branch without any error.

JIT defaults and library floors

The JIT is still off by default, but 8.4 now disables it through opcache.jit=disable with a 64M buffer, instead of a zero buffer size. If you turned JIT on only by setting opcache.jit_buffer_size, set opcache.jit explicitly or it stays off. If JIT is enabled and fails to initialize, PHP 8.4 now exits at startup. The 8.4 other changes page also raises build minimums to OpenSSL 1.1.1, libcurl 7.61.0, libxml2 2.9.4, libpq 10.0 and zlib 1.2.11, and the Apache module now requires Apache 2.4.

Password hashing and rounding behave differently

The default bcrypt cost for password_hash() rises from 10 to 12, so logins and signups that hash on every request do more CPU work. Existing hashes keep verifying, because php.net stores the algorithm, cost and salt inside each hash; password_needs_rehash() can upgrade them on next login if you want to. Separately, round() was rewritten. Some results change, for example 0.49999999999999994 now rounds to 0, and an invalid mode now throws a ValueError. Finance, tax and billing code deserves fixture tests here.

CSV, session and mysqli deprecations

8.4 deprecates relying on the default escape parameter for fputcsv(), fgetcsv() and str_getcsv(); pass it explicitly. Changing session.sid_length or session.sid_bits_per_character is deprecated, and php.net asks that session storage accept 32-character hexadecimal IDs instead. The trans-sid family of session settings and the SID constant are deprecated too. mysqli_ping(), mysqli_kill() and mysqli_refresh() are deprecated, and lcg_value() gives way to Random\Randomizer::getFloat().

The 8.3 layer you also inherit

Skipping 8.3 at runtime does not skip its changes. Date functions now throw DateError and DateException subclasses instead of warnings. range() gained new TypeError, ValueError and warning cases. Code near the stack limit can now throw an Error, assigning a negative index to an empty array changes the next key, and traits with static properties now get separate storage per class. The 8.3 deprecations cover ++ and -- on non-numeric strings, get_class() without arguments and assert_options().

The upgrade plan

The constraint here is the calendar, so the plan favors parallelism: prove 8.4 in CI while the inventory is still being finished, and keep every step reversible by swapping an image or a pool rather than editing code in place.

Phase one: inventory and baseline

Turn the exposure checks into a register with one row per runtime: host or image, SAPI, extensions, ini files, owning team and the flagged code patterns. For each web service, record today's error rate, p95 latency, FPM worker memory and the count of deprecation notices already in the logs. Without that baseline, it is hard to tell an 8.4 regression from normal noise.

Phase two: compatibility testing

Add an 8.4 job to CI beside the 8.2 job and let it fail without blocking merges at first. Run php -l across the tree with the 8.4 binary to catch parse problems, then the full test suite with error_reporting set to E_ALL and deprecations logged to a separate file you can diff. Fix the PECL extension question and the is_resource() checks first, then the nullable parameters. Add fixture tests for round(), CSV parsing and date handling, and make the 8.4 job blocking once it passes.

Phase three: staged rollout

Build an 8.4 image or FPM pool for each service and run it side by side with the 8.2 one. Point a small weighted slice of traffic at the 8.4 pool through your load balancer or ingress, starting with internal tools and queue workers, then read-heavy pages, then logins, checkout and other write paths. Watch CPU on authentication endpoints, given the higher bcrypt cost.

Phase four: cutover and rollback

Once a service has carried full traffic on 8.4 through a normal release without trouble, retire its 8.2 pool, but keep the last 8.2 image tagged and deployable. Because nothing in this hop rewrites your data, rollback is a routing change. Keep it that way by shipping unrelated refactors separately, and finish every cutover before December 31, 2026, so that the fallback image is still a patched one.

Phase five: cleanup

Raise the composer.json php requirement and the config platform entry to 8.4, regenerate composer.lock, and delete the 8.2 CI job, images and packages. Clear the remaining deprecation notices so the 8.5 hop starts clean, and put PHP 8.4's December 31, 2028 end of life into the register now.

PhaseGoalKey techniqueExit criteria
Inventory and baselineKnow every PHP 8.2 runtimephp -v, php -m and php --ini on each host; phpinfo() from the FPM poolRegister complete with owners, extensions and baselines
Compatibility testingCode runs clean on 8.4Parallel CI job, php -l with the 8.4 binary, E_ALL deprecation log diff8.4 job blocking and green; PECL extension decisions made
Staged rolloutProof under live trafficSide-by-side FPM pools, weighted load balancer routingEach service matches its 8.2 baseline
Cutover and rollbackAll traffic on 8.4 by year endRetire 8.2 pools, keep the last 8.2 image taggedA full release on 8.4 with no rollback
Cleanup8.2 gone for goodRaise Composer constraints, remove images and jobsZero 8.2 rows in the register; 8.4's date recorded

Risk matrix

RiskLikelihoodImpactMitigationEarly warning
Cutover not done by December 31, 2026MediumHighPrioritize internet-facing services; run CI and inventory in parallelServices with no 8.4 image by mid-December
App depends on IMAP or OCI8 from coreMediumHighCompile the PECL package into the 8.4 image or replace the integrationExtension missing in php -m on the 8.4 image
is_resource() checks silently take the wrong branchLowHighSearch DBA, ODBC and SOAP code; switch to false or null checksConnection handling paths failing integration tests
Rounding differences change money or tax totalsLowHighGolden-file tests on invoices, reports and exportsDiffs in fixture output between 8.2 and 8.4 jobs
Login endpoints slow down under the higher bcrypt costMediumMediumLoad test auth paths; size FPM workers before cutoverCPU and p95 rise on the canary's login route
JIT quietly turns off, or PHP fails to startLowMediumSet opcache.jit explicitly; smoke test startup in CIStartup fatal errors or lower throughput on 8.4
Deprecation flood hides real errorsHighLowRoute deprecations to their own log and burn them downError log volume jumps on the 8.4 pool

Typical team shape

A short-deadline PHP hop needs one person who owns the register and the date, PHP engineers who clear deprecations and extension issues service by service, and a platform engineer who builds the 8.4 images, FPM pools and weighted routing. If Oracle or mail integrations are involved, add someone who has compiled PECL extensions into production images before.

Many teams begin with a pod of 3 to 5 senior engineers (a tech lead plus engineers), and a full pod is about seven. Ryz engineers on your team start from $7,000 per month (our published range is $7,000–$15,000 per engineer per month, mostly mid-level to senior), quoted per team. Once you say go, engineers can typically start in under two weeks. Ryz engineers work on your team, reporting to your leads. You can bring in PHP developers or DevOps engineers for the image and rollout work, then scope your team with us.

We are not the right fit if you want an hourly freelancer to bump a version number on one small site, or if you need follow-the-sun coverage across Europe and Asia. If the codebase is still on PHP 5 or 7, start with our legacy PHP to modern PHP runbook instead; this page assumes you are already on 8.2.

Related

FAQ

Is PHP 8.2 still safe to run after end of life?

Until December 31, 2026 it still gets critical security releases, though it has had no routine bug fixes since the end of 2024. After that date the PHP project stops patching it entirely, so any newly disclosed flaw in the engine or bundled extensions stays open on 8.2. Running it past the date is a risk you would have to accept and explain, especially for code that faces the internet.

Which version should we upgrade to?

PHP 8.4, which php.net supports with security fixes until December 31, 2028. It is two minor versions up, so you apply both the 8.3 and 8.4 migration notes in one pass. We advise against stopping at 8.3, since it is already security-only and ends a year after 8.2. PHP 8.5, supported to the end of 2029, is a good next step once 8.4 is settled.

How long does the upgrade take?

It depends on how many separate PHP runtimes you have, whether any service needs IMAP, OCI8, PDO_OCI or PSpell, how much code uses typed parameters with null defaults, the strength of your test suite around money and dates, and how quickly each team can approve a traffic shift. The inventory phase is what turns those drivers into a real schedule.

Can we pay for extended support?

The php.net support pages we checked do not describe any paid extended support for end-of-life branches; they simply advise upgrading. If your PHP build comes from an operating system or platform vendor, ask that vendor directly what it will patch on 8.2 and until when, and get the answer in writing before relying on it.

What does it cost to bring in engineers?

Ryz engineers start at $7,000 per person per month, within a published range that goes to $15,000, mostly mid-level to senior. We quote per team, and the math is simply team size times duration times the monthly rate. You get a scoped plan, a price and the names of the people doing the work before anything starts.

Questions we didn't answer? Email info@ryzlabs.com.

Thanks — your message has been sent. We’ll get back to you soon.

Something went wrong while sending your message. Please try again or email info@ryzlabs.com.

Explore Ryz Labs

Software development servicesAI development companyIndustriesStaff augmentationAI pod teamsNearshore software developmentHire engineers by roleEngineer ratesGuidesBuyer guidesCase studiesHow we vet engineers

Ryz Labs

Senior engineers on your team. AI pod teams that ship.

Tell us what you're building. You get a scoped plan, a price and the names of the people who would do the work.

  • Only the top 1% of tens of thousands interviewed make it
  • On US business hours, including New York hours
  • Trusted by Fortune 500 engineering teams

Tell us who you need

A Ryz partner replies with a scoped team plan.

Start a conversation →

Prefer to talk? Book a 15-min call →