PHP 8.6 Ships With Partial Function Application

PHP 8.6 arrives Nov. 19, 2026, bringing partial function application, a Duration class, a new Io\Poll API, and hardened session defaults.

@sharedot

PHP 8.6 Ships With Partial Function Application

By @sharedot · · 6 pages

  • Programming
  • Php
  • Php 8 6

PHP 8.6 arrives Nov. 19, 2026, bringing partial function application, a Duration class, a new Io\Poll API, and hardened session defaults.

What shipped in PHP 8.6

The PHP development team released PHP 8.6 on Nov. 19, 2026, per Linuxiac, with LavX News reporting the same scheduled date. The headline feature is partial function application, which lets developers provide some arguments to a function in advance and receive a closure accepting the remaining ones.

Using ? and ... placeholders, it replaces hand-written anonymous functions — for example, version_compare(?, '8.6', '>=') can be passed directly as a callback to array_filter().

Other additions include a Time\Duration class with nanosecond precision covering more than 250 years, a clamp() function for any comparable value, and a shared SortDirection enum with Ascending and Descending cases.

A polling API built for event loops

The new Io\Poll API monitors many streams at once and uses platform-native mechanisms — Linux's epoll, BSD's kqueue, Solaris event ports, and Windows' WSAPoll — sidestepping the connection limits of stream_select().

Both LavX News and Linuxiac highlight this as a major addition, and Linuxiac notes event loop libraries such as ReactPHP and AMPHP can build on it.

Stream error handling also changes: operations can be configured to throw a StreamException or fail silently instead of emitting warnings, with structured StreamError objects carrying a StreamErrorCode enum case, wrapper name, and affected path retrievable via stream_last_errors().

Security and language cleanups

Sessions are more secure by default: LavX News reports session.use_strict_mode and session.cookie_httponly are now enabled and session.cookie_samesite defaults to Lax.

Language niceties include readonly properties with default values, per-parameter DocComments readable through ReflectionParameter::getDocComment(), and new ReflectionProperty::isReadable() and isWritable() scope-aware methods.

The Sodium extension adds post-quantum key encapsulation via X-Wing and ML-KEM-768, and TLS streams gain session resumption, external pre-shared keys, and TLS 1.3 early data.

Performance work compiles array_map() with first-class callable or partial application callbacks into loops, speeds up printf() and JSON encoding, and caches stateless closures.

Deprecations to plan for

Upgraders face a long deprecation list. Linuxiac highlights the mb_ereg() and mb_split() functions — deprecated because Oniguruma is no longer maintained, with PCRE's u modifier as the replacement — plus spl_object_hash() and older aliases like is_integer() and is_double().

LavX News adds more: return inside a finally block, values returned from __construct() or __destruct(), strcoll() and the SORT_LOCALE_STRING flag in favor of intl's Collator, and passing objects where arrays are expected.

The Sodium, URI builder, and mysqli::quote_string() additions round out a release described as offering better syntax and improved performance.

Sources

  1. news.lavx.hu › PHP 8.6 Scheduled for Nov. 19 Release With Partial Function Application and Polling API
  2. linuxiac.com › PHP 8.6 Released with Partial Function Application, New Polling API

More on Programming