PHP 8.6 is set for release on November 19, 2026. The release includes partial function application, a new polling API, doc comments for function parameters, a set of deprecations, and more.
Partial function application (PFA) lets you create a closure with some parameters already prefilled, using the placeholder syntax: $makeSlug = str_replace(' ', '-', ?); The resulting closure can then be invoked with the remaining argument, e.g. $makeSlug('Hello World');. PFA pairs especially well with the pipe operator, which always requires a callable taking exactly one parameter: $output = 'Hello World' |> str_replace(' ', '-', ?) |> strtolower(...);
The second feature concerns readonly properties. Since PHP 8.4, property hooks can be declared on interfaces, for example: interface MigratesUp { public string $name { get; } public function up(): QueryStatement; }. Before PHP 8.6, readonly properties could not carry default values — a deliberate design decision when readonly was introduced, since a readonly property with a fixed value closely resembles a constant.
With property hooks now usable in interfaces, a default immutable value becomes useful as part of a broader contract. PHP 8.6 therefore allows readonly properties to declare default values, enabling implementations such as final class CreateBooksTable implements MigratesUp { public readonly string $name = '2026-01-01_create_books_table'; ... }.
Comments
No comments yet — be the first.
Open the discussion
No account or password needed — just enter your e-mail and we’ll send you a one-time sign-in link. First time here? You’re set up automatically.
Your rating will be applied automatically after you sign in.
Check your inbox
We’ve sent a sign-in link to …. Open it on this device — this tab will sign you in automatically.
Nothing arrived? Check your spam folder — and mark the mail as "Not spam" so it lands in your inbox next time.