PHP 8.6 is just around the corner now, with its public release scheduled for November 19, 2026. This year’s annual release has had its features locked in since mid-September, and has gone through multiple waves of testing since then.
There’s a decent chance you’ve upgraded your PHP version quite recently off the back of the showstopping PHP2Shell vulnerabilities. PHP 8.6 is all about rolling out new features, rather than urgently patching for exploits.
With PHP 8.6 set to drop very soon, we thought it’d be worth taking a look at what’s in store.
What’s new in PHP 8.6?
As you’d expect, this new annual PHP release comes with a collection of new features. Here are some of the biggest changes:
A new clamp function
clamp(value,min,max)
The new clamp function returns the given value if it falls within the minimum and maximum bounds. If the value falls below or above the bounds, it will be clamped to its nearest bound. For instance:
clamp(5, min: 1, max: 10); // RETURNS 5
clamp(16, min: 0, max: 10); // RETURNS 10
clamp(-1, min: 0, max: 100); // RETURNS 0
The new feature is small in terms of scope, but will likely be very useful for almost everyone writing PHP code.
Partial function application
Partial function application, or PFA, lets you call a function with only some of the arguments filled in, with the rest getting called later. It works by calling a function immediately with the arguments that you know, and leaving a ? for the ones you don’t.
$slugs = array_map(str_replace(' ', '-', ?), $names);
In the above example, the ? expression prevents str_replace() from being called immediately. Instead it creates a closure that waits for the final argument to be run.
Default values for readonly properties
With PHP 8.6, you’ll be able to give readonly properties a default value. Readonly properties were introduced back in PHP 8.1, but you were unable to define default values for readonly properties.
The list goes on
The full list is too long to break down in depth, but some of the highlights on the list include:
- Native Polling API: High-performance I/O polling using
epoll,kqueue, andWSAPoll. - #[\Override] for class constants: The
Overrideattribute can now be applied to class constants, including enum cases. Good for catching broken constant overrides and typos at compile time. - Error messages returned by
json_last_error_msg()now provide additional information. - New
SortDirectionglobal enum added, designed to replace ambiguous strings and boolean flags.
What’s deprecated with 8.6?
New versions don’t just bring new features—they also phase out old features to accommodate the changes and future planning.
Notable features that will be deprecated with PHP 8.6 include:
- Using namespace as a class constant name:
const NAMESPACE = ‘ ‘; - Returning from a finally block:
finally { return []}; } - Using let or is as identifiers:
function let() {} class is() {} - Declaring a return type of ?array for __debugInfo(). Declare
arrayinstead. - Mbregex functions have been deprecated because its underlying Oniguruma library is no longer maintained.
- Returning values from
_construct()ordestruct()is deprecated. - Using long php://filter chains with more than 16 filters will now give a deprecation warning.
To see a full list of deprecated features and functions, check out the official list on the PHP 8.6 migration manual .
It’s worth noting that PHP 8.6 doesn’t introduce any backwards incompatible changes with PHP. However, the new clamp() function in particular means that “clamp” will no longer be available as a function name and could break older user implementations.
Which PHP versions are actually supported?
As with any major software update, there’s no immediate rush to update to the newest version.
In saying that, the PHP Foundation (the official maintainers of PHP) can only offer simultaneous support for a finite amount of PHP versions.
While it's not unheard of to run older, unsupported versions of PHP, the value of running “Actively supported” versions of PHP became quite apparent when PHP2Shell patches were released.
The general rule of thumb is that PHP versions are “actively supported” for approximately 2 years following their release, and then receive security and vulnerability support for another 2 years after that.
As of 17 November 2026, the following versions of PHP are officially supported:
| PHP version | Current status | Active support until | Security support until |
|---|---|---|---|
| PHP 8.5 | Active support | December 31, 2027 | December 31, 2029 |
| PHP 8.4 | Active support | December 31, 2026 | December 31, 2028 |
| PHP 8.3 | Security fixes only | December 31, 2025 | December 31, 2027 |
| PHP 8.2 | Security fixes only | December 31, 2024 | December 31, 2026 |
The urgent detail there is that PHP 8.2 will stop receiving security fixes at the end of 2026. Given the severity and avalanche of vulnerabilities, teams on PHP 8.2 should really be thinking about an upgrade plan. PHP 8.3 is on the same course, just one year down the line.
And at the end of the year, PHP 8.4 will stop receiving active support and move into that “security fixes only” status.
Timelines for PHP 8.6 aren’t yet provided in the PHP documentation because it’s still in active development.
Is PHP 8.6 safer than PHP 8.5?
Back in October, PHP made front page news like we’d never seen before with PHP2Shell. Server maintainers and web hosting companies scrambled to roll out vulnerability updates and mitigations, to keep their servers and their customers safe.
Things move very quickly these days. Keeping your software, PHP or otherwise, up-to-date is one of the most best steps you can take to
This new version of PHP 8.6 will have fixes for PHP2Shell baked in (just like all PHP versions going back to 8.2 already do).
As always, there are also many new security measures being introduced by default in the 8.6 version upgrade. These specifically focus on session management and cookie protections:
session.use_strict_mode = 1session.cookie_httponly = 1session.cookie_samesite = Lax
Will PHP 8.6 be the fastest PHP version yet?
Here at PHP Vitals, the big question on our minds is whether PHP 8.6 offers a performance boost over earlier versions. PHP versions tend to be quicker than their predecessors, but there’s no guarantee.
Any benchmarking tests submitted to the PHP Vitals leaderboard show the PHP version. Once the new version is released and PHP 8.6 tests start flying in, users from all over the world will be able to see for themselves which version of PHP runs quickest.
If you want to see how quickly 8.6 runs compared to other versions on your web host, install the PHP Vitals plugin and run benchmark tests before and after upgrading your PHP version to compare. Each test only takes a couple of minutes.