What's New in PHP 8.6

292 points · 139 comments on HN · read original →

Points and comments are a snapshot, not live.

PHP 8.6 adds partial function application, Duration class, and a Polling API.

Released November 19, 2026, PHP 8.6 introduces partial function application, allowing some arguments to be provided in advance via `?` and `...` placeholders, returning a Closure. A new `\Time\Duration` class represents elapsed time with nanosecond precision. The `Io\Poll` API provides scalable I/O multiplexing using epoll, kqueue, or WSAPoll, replacing `stream_select()`. Other additions include a `clamp()` function, a `SortDirection` enum, readonly property defaults, stream error handling with exceptions, parameter DocComments, and `ReflectionProperty::isReadable()`/`isWritable()` methods. Deprecations include `return` in `finally` blocks, several function aliases, and mbstring regex functions.

What commenters are saying

Commenters are most excited about reduced ZTS overhead, which could enable native async via the parallel extension, and stream error handling improvements that allow exceptions instead of `false` returns. One commenter warns users to patch existing versions first, noting a critical security fix in the same release cycle. Another finds the `clamp()` function overdue, citing an error in the release notes' own `min()`/`max()` example. A debate emerges over PHP's lack of native Unicode support, with defenders noting UTF-8 works fine.