PHP 8.2 end of life: December 31, 2026 and what to do

PHP 8.2 reaches end of life on December 31, 2026. See who is affected, how to check one server and how to plan the upgrade.

PHP 8.2: PHP 8.2 reaches end of life on December 31, 2026

TL;DR

  • PHP 8.2 reaches end of life on December 31, 2026, according to endoflife.date, which is under seven weeks away.
  • Active support already ended on December 31, 2024, so the line has only received security fixes since then.
  • The latest release in the line is 8.2.35. Update every PHP 8.2 server to it now, then plan the move to a PHP release that is still supported.
  • After the end of life date, flaws found in PHP 8.2 are fixed only in newer lines, so any server left behind stays exposed.
  • Stackurity matches end-of-life data against your inventory every day, including PHP found on servers and in images.

What reaches end of life, in plain English

PHP is the language behind a large share of websites, shops and content management systems. Each release line, such as PHP 8.2, goes through two stages. First comes a period of active support, when the project fixes ordinary bugs and security flaws. Then comes a shorter period when only security fixes are released. When that second stage ends, the line reaches end of life and the project stops publishing fixes for it.

The endoflife.date record for PHP shows the dates for the 8.2 line. It was released on December 8, 2022. Active support ended on December 31, 2024. Security support ends on December 31, 2026, and that is the date the record lists as end of life. The record shows no extended support date, so there is no scheduled stage after it.

Why it matters now

Nothing stops working on the day. Your sites keep serving pages and your scripts keep running. What changes is what happens the next time someone finds a flaw in PHP itself: a supported line gets a patch release that you install, while an unsupported line gets nothing, and you have to jump to a newer line in a hurry.

PHP is also a favourite target. It runs on public web servers, it often handles file uploads and user input, and it sits next to databases that hold customer data. We recently wrote about two PHP remote code execution flaws that CISA added to its exploited list, a reminder that attackers do watch this runtime. If a flaw like that appears in the weeks after your line ends, you will not be able to patch your way out of it.

There is an audit cost too. Customers, insurers and auditors ask which components are still supported, and a PHP version past its date needs an exception, a compensating control or a dated plan. It is much easier to have the plan before the date than to explain the gap after it. The same deadline pressure is hitting other runtimes and data stores this season: see our guides to a MariaDB release line reaching its end and a .NET release leaving support, since the same teams often own all of them.

Finally, think about the calendar. The date falls on the last day of the year. Change freezes, holidays and staff leave shrink the number of real maintenance windows between now and then, which is why the sensible moment to start is this week, not in December.

Am I affected?

You are affected if any server, container image, build pipeline or hosting account runs a PHP version that starts with 8.2. That includes production web servers, staging copies, command line workers, scheduled jobs and the PHP bundled into a base image. Shared hosting and managed platforms count too: look for the PHP version setting in the control panel, because that is the one that matters.

To check one Linux machine by hand, run:

php --version
php -r 'echo PHP_VERSION;'

The first prints the version of the command line program. The second prints the version string, which is handy in scripts. Be aware that the command line and the web server can use different PHP builds. To see the web server's version, put a page that calls phpinfo() on a protected test host, or read the version from your process manager's configuration, and remove that page when you are done.

To see how PHP was installed, ask the package manager:

dpkg -l 'php*'
rpm -qa 'php*'

For container images, run the same commands inside a container, and read the image named in each Dockerfile and compose file, since the PHP version often comes from the base image. Search your repositories for configuration that pins a PHP image tag or a version in a build file.

One caveat applies to distribution packages. Linux distributions backport security fixes into the version they ship, so a package can look older than the upstream release while still containing a fix, and a distribution may keep fixing a PHP package for a while after the upstream project stops. That is the distribution's decision, so read its own support notice. Do not treat it as a reason to wait, because you will still have to move eventually.

How to upgrade away from PHP 8.2

  1. Find every use of PHP 8.2. List servers, images, repositories and hosting accounts, and note the owner, environment and exposure of each one.
  2. Update each one to 8.2.35, the latest release in the line, then run your tests and deploy. This keeps you on the newest patched code while you prepare the larger move.
  3. Choose the supported PHP release you will move to. Check the PHP project's supported versions page and the endoflife.date page for PHP for the current list, since that list is not part of the data we cite here, and pick one that your frameworks, extensions and hosting platform support.
  4. Read the PHP migration guide for the release you picked, then run your test suite against it. Look first at removed features, changed defaults and extensions that your code or your dependencies rely on.
  5. Upgrade the dependencies that block the move. Update your framework and libraries to versions that support the new PHP release, and fix the deprecation warnings that appear in your logs.
  6. Roll out gradually: staging first, then a small share of production, then everything. Keep the old servers until the new ones have served traffic cleanly, and update base images, Dockerfiles and build pipelines to match.
  7. Check again after deploying. Confirm that no host or image still reports PHP 8.2, and record anything that could not move before the date, with an owner and a deadline.

How to check with Stackurity

Stackurity keeps one live inventory of your servers, deployed applications, repositories, container images, Kubernetes workloads and AWS managed services, and matches it against end-of-life dates every day. A read-only agent on Linux servers reads installed packages and runtimes installed by hand, and with the opt-in Docker setting it also reads the images of running containers. Runtimes installed outside a package manager are checked for end of life only. Every server that reports the PHP 8.2 line appears in a short list, most urgent first.

Be aware of the limits. Network appliance firmware, statically linked libraries and libraries copied into an application outside a package manager are not covered, so check those by hand. After you upgrade, check again asks the agent for a fresh report and records whether the issue is really gone. See how Stackurity handles fixes in the documentation. The core is open source, and Stackurity Cloud has a 14-day free trial without a card: start a free trial.

FAQ

When does PHP 8.2 reach end of life?

According to endoflife.date, PHP 8.2 reaches end of life on December 31, 2026. After that date the release line gets no further fixes from the PHP project.

Is PHP 8.2 still getting security updates?

Yes, until its end of life date. Active support ended on December 31, 2024, so the line has been receiving security fixes only. The latest release in it is 8.2.35.

What should I upgrade PHP 8.2 to?

Move to a PHP release line that the PHP project still supports. Read the project's supported versions page and the endoflife.date page for PHP, then pick the line with the longest remaining support that your framework, extensions and hosting platform accept.

Does my Linux distribution keep patching PHP after the end of life date?

That depends on the distribution, which decides separately what it supports. Read its security notices and its package support policy. Do not rely on it as a long term plan.

Does Stackurity find PHP 8.2 on my servers?

Stackurity reads installed packages and runtimes on supported Linux distributions, can read the images of running Docker containers when you opt in, and matches end-of-life data against that inventory every day. PHP on appliances, or copied into an application outside a package manager, is not covered.

Sources: endoflife.date record for PHP, Stackurity product facts.