Technology1 min read

What's New in PHP 8.6

By · Published by Everything Blog

In short

Scheduled for launch on November 19, 2026, the update delivers major improvements to the standard library, including a `clamp()` function, a `SortDirection` enum, and a nanosecond-precision stopwatch duration class. Scalable asynchronous input and output is bolstered by the new `Io\Poll` API, built for event loop frameworks like ReactPHP and AMPHP. Stream error handling is concurrently restructured to utilize dedicated exceptions, silent failures, and structured error diagnostics rather than legacy warnings.

Key points

  • The new `Io\Poll` API provides scalable input and output multiplexing using platform engi…: The new `Io\Poll` API provides scalable input and output multiplexing using platform engines like epoll and kqueue.
  • The `\Time\Duration` class provides timezone-independent timing with nanosecond precision…: The `\Time\Duration` class provides timezone-independent timing with nanosecond precision covering spans over 250 years.
  • Upgraded stream operations replace standard runtime warnings with structured `StreamError…: Upgraded stream operations replace standard runtime warnings with structured `StreamError` objects and `StreamException` throws.

Sources checked by our analysis pipeline: 1

PHP 8.6 is a major update of the PHP language, with new features including Partial Function Application, a new Duration class, a Polling API, and a new clamp() function

PHP 8.6 has not been released yet. It will be released on November 19, 2026.

More expressive code, stronger types, and scalable I/O.

Allows some of a function's arguments to be provided in advance, returning a Closure that accepts the rest.

\Time\Duration

Class

The Duration class represents elapsed time as measured by a stopwatch.

Scalable I/O multiplexing using epoll, kqueue, and other native mechanisms, available to event loop libraries like ReactPHP and AMPHP.

clamp()

Function

Ensures that a given value (numeric or otherwise) falls within a specified range.

SortDirection

Enum

A standard, type-safe way to express sort order that can be shared across libraries.

Allows readonly properties to declare default values, so fixed values no longer have to be assigned in the constructor.

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…

Technology