
PHP 8.6 is due on 19 November, and PHP 8.2 reaches end of life on 31 December
The PHP project has scheduled PHP 8.6.0 for 19 November 2026. PHP 8.2 gets its last security fixes on 31 December, when PHP 8.4 also drops to security-only support. Here’s what changes, including safer session cookie defaults, and how to plan your upgrade.
Illustration: UtiBox
If you run PHP, put two dates in your calendar. The PHP project has scheduled PHP 8.6.0 for 19 November 2026, and PHP 8.2 gets no more security fixes after 31 December 2026. On that same day PHP 8.4 moves from full support to security fixes only.
The dates
On 5 November 2026 the PHP team published 8.6.0 RC5, the last release candidate, and said: “The next release will be the first GA release, PHP 8.6.0, planned for 19 November 2026.” Release candidates are test builds, and the team asks people not to run them in production. Check the php.net news page for the final release announcement, because release dates can still move.
Here’s how PHP’s supported versions page lists each branch:
| Branch | Full support until | Security fixes until |
|---|---|---|
| 8.2 | Ended 31 Dec 2024 | 31 Dec 2026 |
| 8.3 | Ended 31 Dec 2025 | 31 Dec 2027 |
| 8.4 | 31 Dec 2026 | 31 Dec 2028 |
| 8.5 | 31 Dec 2027 | 31 Dec 2029 |
In full (“active”) support, reported bugs and security issues get fixed in regular point releases. In security-only support, releases come out only for critical security issues, as needed. After that the branch is end of life and gets no fixes at all.
The 8.2.35 release notes are blunt: “PHP 8.2 reaches end of life on 31 December 2026 and will receive no further security fixes after that date.” PHP 8.1 and older already get no updates from the PHP project. Some Linux distributions and long-term support vendors backport fixes into their own packages. If you rely on one of them, their support dates apply, not the ones above.
What’s new in PHP 8.6
The full list is in the UPGRADING file that ships with RC5. The highlights:
clamp()keeps a value inside a range, for exampleclamp($percentage, min: 0, max: 100). It throws aValueErrorifminis greater thanmax.- Partial function application. Use
?(exactly one argument) or...(any remaining arguments) in a call, and PHP gives you back a closure instead of calling the function, for examplearray_map(str_replace('hello', 'hi', ?), $arr). - Readonly properties can declare default values.
- A new
Time\Durationclass, a polling API (Io\Poll) and a new API for handling stream errors.
You’ll also see new deprecation notices. is_double(), is_long(), is_integer() and doubleval() are deprecated (use is_float(), is_int() and floatval()), as are strcoll() and the mb_ereg* regular-expression functions (mbregex). Mbregex is going because the Oniguruma library it depends on is no longer maintained, and the RFC plans to remove it in PHP 9.0.
The change most likely to break something: session cookies
An accepted RFC, Secure Session Configuration Defaults, changes three settings in PHP 8.6:
| Setting | Old default | PHP 8.6 default |
|---|---|---|
session.use_strict_mode | 0 | 1 |
session.cookie_httponly | 0 | 1 |
session.cookie_samesite | not set | Lax |
For most sites this is a free security upgrade. Strict mode rejects session IDs the server never issued, which blocks session fixation. HttpOnly hides the session cookie from JavaScript. And SameSite=Lax stops browsers sending the cookie with cross-site POST requests, which helps against cross-site request forgery.
Three kinds of code can break:
- JavaScript that reads the session cookie from
document.cookie. It no longer can. The RFC suggests a separate CSRF token for anything client-side code needs. - Flows where another site POSTs back to yours, such as SAML single sign-on (the RFC’s own example). The session cookie isn’t sent on those requests any more. Set
SameSite=Nonetogether withsession.cookie_secure=1for the endpoints that need it, or switch to a token-based flow. - Custom session handlers, or hand-offs that accept an ID created elsewhere. The UPGRADING notes say handlers that relied on accepting outside IDs must implement
validateId()/create_sid(), or set strict mode back to 0.
These are PHP’s built-in defaults. A value set in your php.ini, PHP-FPM pool file or .user.ini still takes priority. Check what your server actually uses:
php -i | grep -E 'session\.(use_strict_mode|cookie_httponly|cookie_samesite)'
The command-line PHP can read a different configuration from PHP-FPM, so also check in the browser: in the developer tools, the session cookie (usually PHPSESSID) should be marked HttpOnly and SameSite=Lax.
What to do
- Find out what you run. Run
php -v, and check the PHP-FPM version too, because the PHP on the command line and the PHP serving your site can differ. If your server sends anX-Powered-Byheader, our HTTP Status Checker shows it. So can anyone else, which is a good reason to setexpose_php = Off. - Still on PHP 8.2? Upgrade before 31 December. PHP 8.4 and 8.5 get security fixes until the end of 2028 and 2029 respectively.
- Test PHP 8.6 in CI, not in production, until 8.6.0 is out and your framework, CMS and extensions support it. Run your tests with
error_reporting=E_ALLso the new deprecation notices show up. - Set the session settings explicitly in your configuration, so an upgrade can’t change how they behave without you noticing.
- Add the dates to your calendar: 31 December 2026 for every 8.2 server, and 31 December 2027 for 8.3.
Check your site’s response headers
Sources
- PHP news: PHP 8.6.0 RC5 available for testing (5 November 2026) (opens in a new tab)
- PHP news archive 2026: PHP 8.2.35 release and the 21 October security advisory (opens in a new tab)
- PHP: Supported versions (opens in a new tab)
- PHP 8.6.0 RC5 UPGRADING notes (php-src on GitHub) (opens in a new tab)
- PHP wiki: PHP 8.6 timetable (opens in a new tab)
- PHP RFC: Secure Session Configuration Defaults (opens in a new tab)
- PHP RFC: clamp (opens in a new tab)
- PHP RFC: Partial Function Application (v2) (opens in a new tab)
- PHP RFC: Oniguruma maintenance end and end of mbregex (opens in a new tab)
Related
More from News
UK CMA opens call for evidence on cloud IAM and Kubernetes lock-in
The UK Competition and Markets Authority is asking developers how they use identity and access management and Kubernetes, and how easily they can switch clouds. Responses close on 3 December 2026.
Apple services disrupted on November 17: what happened to iCloud, the App Store and Apple Music?
An internal update knocked out iCloud sign-in, the App Store, Apple Music and more on Tuesday, 17 November. Apple says it wasn’t a cyberattack, and its status page showed everything resolved by 6…
N-able Mail Assure and SpamExperts security incident: what customers should know
N-able says someone gained unauthorized access to one server in its Mail Assure and SpamExperts Hosted Cloud. Mail flow and filtering continue; dashboards, the API and quarantine are offline while…
















