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

ReleasedNov 25, 2021
Security support endedDec 31, 2025
Last release8.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:

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

VersionLatest releaseSecurity fixes until
PHP 8.58.5.13Dec 31, 2029
PHP 8.48.4.28Dec 31, 2028
PHP 8.38.3.37Dec 31, 2027
PHP 8.28.2.36Dec 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.

InChangeWhat it means
8.2Dynamic properties deprecatedSetting 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 deprecatedUse "$var" or "{$var}" instead.
8.2utf8_encode() and utf8_decode() deprecatedCommon in older import and export code.
8.2strtolower(), strtoupper(), ucfirst() and similar ignore the localeThey now convert ASCII only, as if the locale were "C". Use the mb_ functions for other languages.
8.2str_split() on an empty string returns an empty arrayIt used to return an array with one empty string.
8.3Date errors throw exceptionsThe Date extension throws DateError and DateException instead of warnings, so bad dates can stop a page instead of logging a warning.
8.3Negative index on an empty arrayAfter $a[-5] = x on an empty array, the next index is -4, not 0.
8.3Deep recursion can throw an ErrorCode 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.

How to move off PHP 8.1

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.