What happens on 31 December 2026
php.net maintains every PHP version in two phases: first active support with regular bug fixes, then security fixes only. PHP 8.2 was released on 8 December 2022. Active support ended on 31 December 2024, and security support ends on 31 December 2026.
Your website will not stop working on that day. But if a security vulnerability in PHP 8.2 is discovered afterwards, the PHP project will no longer publish a fix.
| Version | Security updates until | Active support until | Released |
|---|---|---|---|
| 8.1 and older | ended (PHP 8.1 on 31 Dec 2025) | ended | – |
| 8.2 | 31 Dec 2026 | 31 Dec 2024 | 8 Dec 2022 |
| 8.3 | 31 Dec 2027 | 31 Dec 2025 | 23 Nov 2023 |
| 8.4 | 31 Dec 2028 | 31 Dec 2026 | 21 Nov 2024 |
| 8.5 | 31 Dec 2029 | 31 Dec 2027 | 20 Nov 2025 |
| 8.6 | 31 Dec 2030 | 31 Dec 2028 | 19 Nov 2026 |
There is one exception: some Linux distributions continue to provide security fixes for the PHP version they ship beyond the official end of life. This applies to your own servers running PHP from distribution packages. On shared hosting, your provider decides how long PHP 8.2 remains available.
How to find out which version you are running
There are several ways to check your PHP version. What matters is the version your web server uses to deliver your pages:
- In your hosting control panel: usually in the domain settings or under a “PHP” menu item.
- In WordPress: under Tools → Site Health → Info → Server.
- With
phpinfo(): a small PHP file calling this function shows the web server’s version and configuration. Delete the file afterwards, as it reveals a lot of detail about the server. - On the command line: with
php -v. Note that the command line can use a different version from the web server, and so can cron jobs. - In
composer.json: therequire.phpentry shows which PHP versions the application supports.
What happens if you do nothing
- Vulnerabilities stay open. Newly discovered weaknesses in PHP 8.2 will no longer be fixed. The risk grows every month.
- Your host switches versions. Many providers move unsupported versions to a newer one after a transition period or charge extra to keep them running. If your code is not compatible, the website shows errors or a blank page.
- Library updates stop. New versions of frameworks and packages require newer PHP versions; Symfony 8, for example, requires PHP 8.4. If you stay on PHP 8.2, you will eventually be unable to install their security updates.
- Data protection. Under Article 32 GDPR, anyone processing personal data must take appropriate technical measures, taking the state of the art into account. A PHP version without security updates is hard to reconcile with that.
Which version to move to
An intermediate step to PHP 8.3 is rarely worthwhile: it also receives security fixes only, until the end of 2027. Sensible targets are:
- PHP 8.4 has been available for two years and is supported by most libraries, frameworks and hosts. It receives security updates until the end of 2028.
- PHP 8.5 has been available since November 2025 and receives security updates until the end of 2029.
- PHP 8.6 was released on 19 November 2026 and receives security updates until the end of 2030. In the first months after a release, not all libraries, extensions and hosts support the new version yet.
What matters is what your dependencies officially support. For most applications, PHP 8.4 or 8.5 is currently the right choice. PHP 8.6 makes sense as soon as all the packages you use support it.
What typically comes up when moving from PHP 8.2
Upgrading within PHP 8 is usually smaller than earlier jumps, such as from PHP 7 to 8. The migration guides on php.net list every change for each version. These points are particularly relevant for existing code:
From PHP 8.3
- Calling
get_class()andget_parent_class()without an argument is deprecated. - Using
++on empty or non-alphanumeric strings and--on empty or non-numeric strings is deprecated.
From PHP 8.4
- Implicitly nullable parameters are deprecated:
function save(Customer $customer = null)must become?Customer $customer = null. This affects a lot of older code but can largely be converted automatically, for example with Rector. - The IMAP, OCI8, PDO_OCI and PSpell extensions are no longer bundled with PHP and are only available via PECL. If you fetch emails via IMAP, for example, you need an alternative or a server where the extension can be installed separately.
trigger_error()withE_USER_ERRORis deprecated, as is theE_STRICTconstant.exit()anddie()now behave like functions: invalid argument types result in aTypeError.
From PHP 8.5
- The casts
(boolean),(integer),(double)and(binary)are deprecated. Use(bool),(int),(float)and(string)instead. - The backtick operator as a shorthand for
shell_exec()is deprecated. - Using
nullas an array offset or inarray_key_exists()is deprecated. __sleep()and__wakeup()are considered outdated. Use__serialize()and__unserialize()instead.
From PHP 8.6
is_double(),is_long(),is_integer()anddoubleval()are deprecated. Useis_float(),is_int()andfloatval()instead.returninside afinallyblock is deprecated, as are return values from__construct()and__destruct().trim(),ltrim()andrtrim()now also strip the form feed character\fby default.- Several functions now throw a
ValueErrorfor invalid arguments instead of carrying on silently, for examplescandir()with an invalid sorting order orsleep()with values that are too large.
Deprecated syntax keeps working for now and only produces notices in the error log. It does, however, signal what is set to be removed in a later major version. It is worth fixing it as part of the upgrade.
Five steps to the upgrade
- Take stock. Record the PHP version, framework or CMS, Composer packages, extensions and the PHP extensions on the server.
- Check compatibility. Static analysis, for example with PHPStan, shows affected code before it fails in production.
composer why-not php 8.4lists the packages that block a target version. - Set up a staging environment. A copy of the website runs on the target version, separate from the live system. Its error log records every message, including deprecation notices.
- Adapt and test. Update code and dependencies, then check forms, login, orders, imports, integrations and cron jobs.
- Switch over with a way back. Create a backup, switch at a quiet time and watch the error log during the first days. The way back to the previous version is prepared.
What the effort depends on
A reliable figure cannot be given without looking at the code. These factors make the difference:
- the starting version: from PHP 8.2 the path is usually shorter than from PHP 7 or 5,
- the share of custom code compared with maintained standard software,
- the number and maintenance status of the libraries and extensions used,
- existing automated tests,
- encrypted extensions without source code, which cannot be adapted.
A review clarifies the scope before any implementation costs arise. The PHP upgrade page describes how I approach it.
Sources: php.net, Supported Versions and Unsupported Branches; migration guides for PHP 8.3, PHP 8.4, PHP 8.5 and PHP 8.6, retrieved on 26 November 2026.
