Skip to content

PHP 8.6 locks its feature set as RC3 ships ahead of November GA

The third release candidate for PHP 8.6 is bug fixes only, confirming partial function application, clamp() and readonly property defaults as the version heads towards general availability.

Source: PHP.net

PHP 8.6.0 RC3 went out on 6 October, and php.net’s own notes describe it as bug-fix and memory-safety corrections only, across 21 areas, with no new features and no CVEs. That is expected this late in the cycle: the feature freeze already passed, so RC3 is purely about stability before release.

The feature list locked in at freeze includes partial function application, which lets you pre-bind some arguments of a call with ? as a placeholder for the ones you’ll supply later, a new clamp() function for constraining a value to a range, a Duration class, readonly properties that can now carry default values, and optimisations to closures created from first-class callables. PHP’s release wiki has general availability targeted for 19 November.

function add(int $a, int $b): int {
    return $a + $b;
}

$addFive = add(5, ?); // ? marks the argument to fill in later

Why it matters: if you maintain a library or framework that wants day-one 8.6 support, RC3 is the build to test against now — the feature set is frozen, so anything that works against RC3 should carry through to the final release on 19 November.

Share

Related reading

More from The Wire

All briefs