NEWSFEVER
Technology worth discussing24 / 7 · RU + EN
Back to feedDevelopment & Open Source

PHP 8.6 to add partial function application, Duration and a new I/O API

An overview on php.net details PHP 8.6 features ahead of its scheduled November 19, 2026 release.

Published: 19 Nov 2026, 11:00 UTC
Modular blocks assemble into a function beside a stopwatch and a hub connecting multiple streams.
Editorial illustration of PHP 8.6 features for function arguments, elapsed durations and streams.

An overview published on php.net outlines PHP 8.6 additions for functions, elapsed time and stream I/O. The page states that the version has not yet been released and gives November 19, 2026 as its scheduled release date.

Partial Function Application lets developers supply some arguments in advance, leaving ? and ... placeholders for the rest. It returns a Closure, with the original function called only after the remaining arguments are supplied. The new Time\Duration class represents elapsed time independently of calendar time and time zones. It supports a range exceeding 250 years with nanosecond precision, making it suitable for timeouts and benchmark timings.

The Io\Poll API monitors many streams simultaneously using platform mechanisms including epoll, kqueue, event ports and WSAPoll. It is designed as a shared foundation for event loop libraries such as ReactPHP and AMPHP. Stream operations can also be configured to throw StreamException or fail without warnings, while errors are available as structured StreamError objects.

The clamp() function keeps comparable values within a specified range, returning the nearest boundary when a value falls outside it. SortDirection provides a shared, type-safe sorting order through its Ascending and Descending cases. Readonly properties gain support for default values, while function and method parameters can have individual DocComments accessible through ReflectionParameter::getDocComment().

Original source: php.net ↗

Comments on source platforms

Rank is the maximum of the latest discussion counts. These are source metrics.

Hacker News