Check a site
Check a website Service status Outages Blog
Theme
All tools
Check a websiteBrowse all tools
A terminal window running php -v and showing PHP 8.6.0, beside a calendar strip with 19 Nov and 31 Dec highlighted

News

PHP 8.6 is due on 19 November, and PHP 8.2 reaches end of life on 31 December

Posted Jimel S.5 min read

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:

BranchFull support untilSecurity fixes until
8.2Ended 31 Dec 202431 Dec 2026
8.3Ended 31 Dec 202531 Dec 2027
8.431 Dec 202631 Dec 2028
8.531 Dec 202731 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 example clamp($percentage, min: 0, max: 100). It throws a ValueError if min is greater than max.
  • 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 example array_map(str_replace('hello', 'hi', ?), $arr).
  • Readonly properties can declare default values.
  • A new Time\Duration class, 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:

SettingOld defaultPHP 8.6 default
session.use_strict_mode01
session.cookie_httponly01
session.cookie_samesitenot setLax

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=None together with session.cookie_secure=1 for 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

  1. 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 an X-Powered-By header, our HTTP Status Checker shows it. So can anyone else, which is a good reason to set expose_php = Off.
  2. 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.
  3. 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_ALL so the new deprecation notices show up.
  4. Set the session settings explicitly in your configuration, so an upgrade can’t change how they behave without you noticing.
  5. 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

Related

More from News

Most read

Latest

Most read

  1. 01November Patch Tuesday lands on the 10th: what October’s record release tells us19
  2. 02Introducing UtiBox: the Web’s Utility Box2
  3. 03Ivanti Connect Secure zero-days gave attackers root on VPN gateways1
  4. 04“Black October”: attackers raid secrets at cloud and AI developer platforms1

Embed this post

Paste this code into your page. It shows the post as a card that links back here. In WordPress you can also paste the post’s address on a line of its own.

Cookies on UtiBox

UtiBox is free because of ads. Google and its partners use cookies to show, limit and measure ads, Google Analytics, Ahrefs Web Analytics and Microsoft Clarity show us how the site is used, and we use a few essential cookies to run the site.