PHP 8.1 end of life
PHP 8.1 reached end of life on December 31, 2025: its last release is 8.1.34 (Dec 18, 2025), and PHP shipped no PHP2Shell fix for it on October 21, 2026. Sites on 8.1 have to move to a supported version, and PHP 8.3 or 8.4 is the target that lasts.
Not sure your site is on 8.1? Use our free PHP version checker. For the flaw that makes this urgent, see PHP2Shell fixed versions.
Read-only: one standard page request, like a browser visit. We never send attack traffic.
PHP 8.1 key dates
| Released | Nov 25, 2021 |
| Security support ended | Dec 31, 2025 |
| Last release | 8.1.34 (Dec 18, 2025) |
| PHP2Shell (CVE-2026-109618, CVE-2026-109619) | No release with the fix |
What PHP2Shell means for PHP 8.1
PHP2Shell lets an attacker run code on the server without logging in, and PHP rates it 9.2 (CVSS v4.0, PHP's rating). PHP's advisory says 8.1 and older no longer get updates from the PHP project. Your options:
- Move to PHP 8.3 or 8.4. The only option that also keeps getting PHP's future security fixes.
- Ask your Linux distribution or long-term-support vendor. PHP says some provide backported fixes for 8.1.
- Build from source. PHP's security team published a minimal source backport for 8.1. It's a code branch, not a release, and a shared host won't install it for you.
Until then, php.net lists php.ini mitigations that reduce exposure but, in its words, "do not make an installation safe".
Where to move: supported versions
| Version | Latest release | Security fixes until |
|---|---|---|
| PHP 8.5 | 8.5.13 | Dec 31, 2029 |
| PHP 8.4 | 8.4.28 | Dec 31, 2028 |
| PHP 8.3 | 8.3.37 | Dec 31, 2027 |
| PHP 8.2 | 8.2.36 | Dec 31, 2026 |
PHP 8.2 ends on Dec 31, 2026. Skipping straight to 8.3 or 8.4 saves a second move next year.
What changes moving from 8.1 to 8.3
From PHP's own migration guides. Deprecated means the code still runs but logs a notice; the rest changes behaviour.
| In | Change | What it means |
|---|---|---|
| 8.2 | Dynamic properties deprecated | Setting a property a class never declared now logs a deprecation notice, unless the class opts in with #[\AllowDynamicProperties]. Older plugins and themes do this a lot. |
| 8.2 | "${var}" string interpolation deprecated | Use "$var" or "{$var}" instead. |
| 8.2 | utf8_encode() and utf8_decode() deprecated | Common in older import and export code. |
| 8.2 | strtolower(), strtoupper(), ucfirst() and similar ignore the locale | They now convert ASCII only, as if the locale were "C". Use the mb_ functions for other languages. |
| 8.2 | str_split() on an empty string returns an empty array | It used to return an array with one empty string. |
| 8.3 | Date errors throw exceptions | The Date extension throws DateError and DateException instead of warnings, so bad dates can stop a page instead of logging a warning. |
| 8.3 | Negative index on an empty array | After $a[-5] = x on an empty array, the next index is -4, not 0. |
| 8.3 | Deep recursion can throw an Error | Code very close to overflowing the call stack may now stop with an Error. |
Before switching, update every plugin and theme, turn on error logging, and run the site on a staging copy with the new PHP. How to switch on each host: how to update your PHP version.
Stuck on 8.1? Our step-by-step update guide covers moving to a supported version on every common host, and continuous monitoring tells you the day the move is done right.
Questions
When did PHP 8.1 reach end of life?
On December 31, 2025. Its last release is 8.1.34, out Dec 18, 2025.
Is PHP 8.1 affected by PHP2Shell?
Yes. PHP's advisory says 8.1 and older no longer receive updates from the PHP project, so there is no 8.1 release with the fix. PHP's security team published a minimal source backport for people who build PHP themselves, and some Linux distributions and long-term-support vendors provide backported fixes.
Should I move from 8.1 to 8.2, 8.3 or 8.4?
8.3 or 8.4. PHP 8.2's security support ends December 31, 2026, so you'd be moving again within weeks. PHP 8.3 is supported until December 31, 2027 and 8.4 until December 31, 2028.
Will my site break moving from 8.1 to 8.3?
Most of what changes are deprecations, which log notices but keep working. The real breaks come from code that relied on the behaviour changes listed on this page, or from plugins and themes nobody has updated in years. Test on a copy first.
Checked December 3, 2026. Sources:
- PHP security advisory: critical remote code execution vulnerabilities, php.net (Oct 21, 2026)
- Supported versions, php.net
- Unsupported branches, php.net
- Sansec: PHP2Shell (Oct 21, 2026)
- Debian security tracker: CVE-2026-109618
- PHP 8 ChangeLog (CVE fixes per release), php.net
- Deprecated features in PHP 8.2, php.net manual
- Backward incompatible changes in PHP 8.2, php.net manual
- Backward incompatible changes in PHP 8.3, php.net manual
