Skip to content
ShiftDelete.Net
Search news/ TR Türkçe
News Feed AI Smartphones Games Cars Computers Social Media Space Reviews Latest news
  1. Home
  2. Software

PHP 8.6 Arrives November 19 With Partial Function Application

PHP 8.6, scheduled for release on November 19, adds partial function application, a Duration class, a new Polling API and clamp(). The PHP team also announced critical security releases for the same day.

Ender Öztürk

Published 3 min read

Abstract illustration of code on a dark background

PHP 8.6, the next major update of the PHP language, is scheduled for release on November 19, 2026. The PHP team's release page lists partial function application, a new Duration class, a Polling API and a new clamp() function as the headline features. At the time of writing, however, the page still said PHP 8.6 "has not been released yet," and the latest build available for download was the RC7 release candidate.

The same day also brings an unusual coincidence. The PHP security team announced critical security releases for all supported PHP versions, scheduled between 14:00 and 14:30 UTC on November 19.

Partial function application

The biggest language change lets developers supply some of a function's arguments in advance. Using the ? and ... placeholders for the rest, PHP returns a Closure, and the original function only runs once the remaining arguments are passed in. In practice, this replaces many small arrow functions written only to fix one argument, such as calling version_compare(?, '8.6', '>=') directly inside array_filter().

Duration, Polling API and clamp()

The new \Time\Duration class represents elapsed time as measured by a stopwatch, independent of any time zone. According to the PHP team, it can represent a range of more than 250 years with nanosecond precision, which suits timeouts and benchmark timings. Durations are comparable, so functions like min() work on them directly.

The Io\Poll API monitors many streams at once using the best mechanism on each platform, including epoll, kqueue, event ports and WSAPoll. It avoids the scalability limits of stream_select(), which typically cannot handle more than 1,024 connections, and is designed as a foundation for event loop libraries such as ReactPHP and AMPHP.

The new clamp() function keeps a value within a given range and returns the nearest boundary otherwise. A new SortDirection enum, with Ascending and Descending cases, gives libraries a shared, type-safe way to express sort order instead of a mix of integers, strings and custom enums.

Other changes developers will notice

  • Stream operations can throw a StreamException or fail silently instead of emitting warnings, with structured StreamError objects.
  • Readonly properties, including those in readonly classes, can declare default values.
  • Function parameters can carry their own DocComments, readable via ReflectionParameter::getDocComment().
  • New ReflectionProperty::isReadable() and isWritable() methods account for visibility, hooks and readonly state.
  • The #[\Override] attribute now works on class constants and enum cases.
  • The Sodium extension adds post-quantum key encapsulation with X-Wing and ML-KEM-768.
  • TLS streams support session resumption and TLS 1.3 early data, and JSON error messages now point to the location of the error.

What to do before upgrading

For hosting companies and developers, the practical advice is to treat November 19 as two separate events. The security releases address vulnerabilities whose highest severity is rated critical, although the PHP team says the critical issues require either a non-default configuration or an uncommon setup. Users of currently supported versions are urged to prepare to upgrade promptly, and fixed version numbers will be published alongside the releases.

Moving to PHP 8.6 itself is a bigger job. The PHP team's migration guide lists the incompatible changes and deprecations, and production sites usually wait for hosting providers and frameworks to confirm support. The full feature list and code comparisons are on the official PHP 8.6 release page.

Advertisement