PHP 8.6.0 is released: partial function application arrives, and three session defaults flip to secure
The headline feature is a new way to write closures; the upgrade risk is three session settings that changed value without anyone editing a config file.
PHP 8.6.0 went out on November 19, 2026. The project's announcement is short: "The PHP development team announces the immediate availability of PHP 8.6.0. This release marks a major update to the PHP language." The headline feature is partial function application. The change most likely to be noticed on a running site is quieter: three session settings now default to the secure value.
What 8.6 adds
The announcement lists six items: partial function application, default values for readonly properties, a new Io\Poll API for monitoring streams, a clamp() function, a \Time\Duration class and a SortDirection enum.
Partial function application is described on the release page this way: "Allows some of a function's arguments to be provided in advance, using ? and ... placeholders for the rest. The result is a Closure, and the function is only called once the remaining arguments are passed to it." The project's own example:
$versions = ['8.4', '8.5', '8.6', '8.7', '9.0'];
$supportsPfa = array_filter(
$versions,
version_compare(?, '8.6', '>='),
);
Io\Poll is pitched at the people who write event loops. The release page says it monitors many streams "using the best mechanism available on each platform (epoll, kqueue, event ports, or WSAPoll), without the scalability limits of stream_select()."
Three session defaults flip
The migration guide puts it in one sentence: "The defaults of three session INI settings have changed to provide secure behavior out of the box". The three, as the guide lists them:
session.use_strict_mode"is now 1 (was 0)". Strict mode rejects session IDs the server did not issue, which the guide says mitigates session fixation.session.cookie_httponly"is now 1 (was 0)". JavaScript can no longer read the session cookie throughdocument.cookie.session.cookie_samesite"is now "Lax" (was unset)". The cookie is no longer sent on cross-site requests other than top-level navigations using safe HTTP methods.
A site that already sets all three explicitly sees no difference. A site that relied on the old defaults gets new behavior on upgrade, and the guide names who breaks: applications that read the session cookie from JavaScript, applications that depend on the cookie arriving with a cross-site POST, and custom session handlers that accept externally supplied IDs. To get the old behavior back, the settings have to be written out:
session.use_strict_mode = 0
session.cookie_httponly = 0
; cross-site POST needs None, and None needs Secure
session.cookie_samesite = "None"
session.cookie_secure = 1
Custom save handlers get a deadline as well. Passing session_set_save_handler() an object without both create_sid() and validateId() is now deprecated, and the deprecation page says that in PHP 9.0 the two methods "will be moved" into SessionHandlerInterface, "where they will be required."
Small breaks worth a grep
The backward-incompatible list is long and mostly narrow. A few entries touch ordinary code:
trim(),ltrim()andrtrim()now strip form feed (\f) by default.fclose(),file_put_contents()andcopy()now returnfalsewhen flushing or closing the stream fails, per the release page, "instead of silently ignoring the failure."preg_grep()returnsfalseon a PCRE execution error, where it used to return a partial array.- A file is treated as a Phar archive on include only when
.pharis its filename extension. Previously, the guide says, the string "could occur in a directory name or as part of an extension such as ".pharma"." - The
mb_ereg()family is deprecated because, in the release page's words, "the underlying Oniguruma library is no longer maintained." returninside afinallyblock is deprecated.
The same day's security releases
PHP 8.5.13, 8.4.28, 8.3.37 and 8.2.36 shipped on the same date, each announced as "a security release." The pre-announcement a day earlier said: "The highest severity is CRITICAL. The issues rated CRITICAL require either non-default configuration or uncommon setups."
The 8.6.0 announcement does not mention security. The ChangeLog does: by our count, the 8.6.0 entry names 18 CVE identifiers, and they are the same 18 that appear in the 8.5.13 entry. Going by the ChangeLog, the first 8.6 release carries the fixes; it does not start life a patch behind.
Primary sources: PHP 8.6.0 release announcement and 2026 news archive, PHP 8.6 release page, Migration guide: backward incompatible changes, Migration guide: deprecated features, PHP 8 ChangeLog, read 2026-11-20.