PHP 8.6: Release Date, New Features and What to Test

· PHP, Development

Table of contents

PHP 8.6 is in its release-candidate phase: RC3 was scheduled for October 8, 2026, and the official release timetable targets general availability on November 19, 2026. Feature freeze is long behind us, so the feature list is settled. A month after writing about PHP 8.5, here is what PHP 8.6 brings, which features I expect to use in real projects, and what to test while the RCs are still out.

PHP 8.6 release date

The timetable on the PHP wiki lists the remaining milestones:

  • RC3: October 8, 2026
  • RC4: October 22, 2026
  • RC5: November 5, 2026
  • GA: November 19, 2026

Release candidates only take bug fixes, so what you test today is what ships, minus the bugs you report. That makes the next few weeks the cheapest moment to run your test suite against 8.6.

Partial function application

The headline feature is partial function application (PFA). In a call, ? stands for exactly one missing argument and ... for all the remaining ones. Instead of running the function, the call returns a Closure that waits for the missing arguments:

// One placeholder per missing argument
$c = stuff(1, ?, 3.5, ?, ?);

// Keep every remaining parameter as it is
$c = stuff(1, 'hi', ...);

// Mix with named arguments
$c = stuff(?, ?, f3: 3.5, p4: $point, ...);

Combined with the pipe operator from PHP 8.5, it removes most of the small arrow functions we wrote just to fix one argument. A few rules worth knowing before you use it everywhere:

  • Arguments you pass are evaluated when the closure is created, not when it is called.
  • ? cannot follow a named argument.
  • Constructors cannot be partially applied with new; static factory methods can.

clamp() and Time\Duration

Two small additions replace code every project rewrites. clamp() keeps a value between two bounds, and throws a ValueError if $min is greater than $max:

clamp(6, min: 1, max: 3); // 3
clamp(0, min: 1, max: 3); // 1
clamp(2.5, 1, 3);         // 2.5

No more max($min, min($max, $value)) with the arguments in the wrong order. In a Magento context I see it in quantity and pagination limits, where a bad request parameter should be capped rather than rejected.

The new Time\Duration class is an immutable, fixed-length duration with nanosecond precision. Unlike DateInterval, it has no days or months, so it cannot be ambiguous around daylight saving time. It is exactly what retry and timeout code needs:

use Time\Duration;

$baseDelay = Duration::fromMilliseconds(100);
$attempt = 5;
$delay = $baseDelay->multiplyBy(2 ** $attempt); // 3.2 seconds

Readonly defaults and other changes

Readonly properties can now declare a default value, which was a compile-time error before:

final class RuleA
{
    public readonly string $className = SomeParser::class;
}

The default counts as the initialisation, so the constructor can no longer write to that property. It is handy for constant-like properties that implement an interface's { get; } property.

Other implemented RFCs on the PHP RFC list include:

  • a global SortDirection enum with Ascending and Descending cases, a cleaner type for query builders and sorting APIs;
  • #[\Override] on class constants;
  • a deprecation of returning values from __construct() and __destruct();
  • secure session configuration defaults, and function arguments displayed in errors.

The session-defaults change is the one I would read carefully before upgrading: if your application relies on PHP's built-in session settings, compare the new defaults with your current php.ini.

How to test PHP 8.6 now

My checklist while the RCs are out:

  1. Run the test suite on an RC image in CI, as a non-blocking job, so failures show up without breaking the main pipeline.
  2. Grep for constructors that return a value; the new deprecation will flag them.
  3. Check your dependencies: frameworks and extensions usually announce 8.6 support around GA, so do not upgrade production before they do.
  4. Review session settings against the new defaults.
  5. Report anything odd on the PHP issue tracker while it can still be fixed before GA.

Conclusion

PHP 8.6 continues the direction of 8.5: fewer helper closures with partial function application, fewer hand-written utilities with clamp() and Duration, and stricter defaults. None of it forces a rewrite, and the upgrade from 8.5 should be smooth for well-tested code. Test on the release candidates now, wait for your framework to declare support, and plan the production upgrade for after November 19.

Sources: PHP wiki: PHP 8.6 release timetable, PHP wiki: RFC list, Warp2Search: PHP releases 8.6.0 RC3.