PHP 8.6 was released on 19 November 2026. It brings partial function application, a new clamp() function, a Duration class, safer session defaults and a batch of deprecations. Here is what changes, what can break and when your site should upgrade.
The short answer
- Don't rush production on day one. Start testing now, and upgrade once your framework, CMS, plugins and host support 8.6, usually after the first patch releases.
- If you are on PHP 8.2 or older, act now. PHP 8.2 stops receiving security fixes on 31 December 2026. Moving to a supported version matters more than any new feature.
- Whatever version you run, stay on its latest patch. The PHP2Shell vulnerabilities in October showed how quickly an old patch level becomes a risk.

What's new
Partial function application
You can now call a function with some arguments filled in and get back a closure for the rest. ? stands for one missing argument and ... for all the remaining ones.
= (, , ?);
();
It is a cleaner alternative to writing small wrapper closures, and it works well with the pipe operator that arrived in PHP 8.5.
clamp()
Keeps a value between a minimum and a maximum. If the minimum is greater than the maximum it throws a ValueError.
(, : , : );
(, : , : );
(-, : , : );
Time\Duration
A readonly class for lengths of time, with nanosecond precision, arithmetic and comparison. No more guessing whether a number means seconds or milliseconds.
Readonly properties can have defaults
{
= ;
}
For library authors
- Polling API (
Io\Poll): one interface over epoll, kqueue and similar system calls, as a modern base for event loops. It does not add async features by itself. - Stream error handling: structured
StreamErrorobjects instead of guessing from warnings. - Smaller additions: a
SortDirectionenum,__debugInfo()on enums, doc comments on parameters, and more methods in the URI extension added in 8.5.
What can break
Safer session defaults
| Setting | Old default | New default |
|---|---|---|
session.use_strict_mode | 0 | 1 |
session.cookie_httponly | 0 | 1 |
session.cookie_samesite | not set | Lax |
These are good security defaults. If your php.ini sets these values explicitly, your settings still apply. Apps that use PHP's native sessions should check three things: JavaScript that reads the session cookie, cross-site POST requests that expect the cookie (for example some payment gateway callbacks), and code that supplies its own session IDs. Laravel and most frameworks manage their own session cookies, so they are less likely to be affected.
Deprecations
PHP 8.6 deprecates a number of older functions and patterns. Deprecations do not stop your code from running, but they fill logs with warnings and will become errors in a future major version. Run your test suite on 8.6 with deprecation notices visible and read the official upgrade notes for the full list.
How long each version is supported

| Version | Security fixes until |
|---|---|
| 8.2 | 31 December 2026 |
| 8.3 | 31 December 2027 |
| 8.4 | 31 December 2028 |
| 8.5 | 31 December 2029 |
| 8.6 | 31 December 2030 (expected, under the current policy) |
Each version gets two years of bug fixes and then two years of security fixes only.
How to upgrade safely

- Check your host offers PHP 8.6, or when it will.
- Check your dependencies. Framework, CMS, plugins and Composer packages must support 8.6.
- Test in staging, or add 8.6 to your CI matrix.
- Fix deprecations while they are still only warnings.
- Switch production with a rollback plan. On most hosts this is a control panel setting you can change back.
- Watch the logs for a few days after the switch.
How Develenza can help
We build and maintain PHP and Laravel applications, and we upgrade them. If you want your sites checked, tested on 8.6 and moved to a supported version without surprises, contact us.
Sources
- PHP 8.6 release announcement
- PHP supported versions
- PHP RFC: Partial Function Application v2
- The PHP Foundation: PHP 8.6 kicks off with partial function application
- Laravel News: What's New in PHP 8.6