PHP 8.6 Is Out: What Laravel Devs Get on Day One

PHP 8.6 Is Out: What Laravel Devs Get on Day One

PHP 8.6 Is Out: What Laravel Devs Get on Day One

PHP 8.6.0 came out on 19 November 2026. It is the last small release before PHP 9, and nothing in it is a surprise — the feature list was locked on 22 September. If you read our RC5 checklist two weeks ago, you already know what to fix before upgrading. This article is the other half: what is actually new, what changed after RC5, and what to do today.

1. Partial function application — the big one

This is the feature everyone will talk about. You call a function, fill in some of the arguments now, leave the rest as ?, and PHP hands you back a new function that takes whatever is left.

$addTen = add(10, ?);
$addTen(5); // 15
 
$users = array_filter($users, isAdmin(?));

It builds on the first-class callable syntax from PHP 8.1 (strlen(...)). The difference is how your code reads: instead of wrapping every callback in fn($x) => ..., you write the call you actually mean and leave holes in it. Laravel code is full of callbacks — collection pipelines, validation rules, event listeners — so you will meet this one in real code very soon.

One warning from the RC5 checklist still stands: tools built on PHP-Parser, including PHPUnit code coverage, may not understand the new ? syntax yet. It is fine in app code you do not measure coverage on. Keep it out of covered code until the tooling catches up.

2. The small features you will use first

clamp() keeps a value inside a range: clamp($score, 0, 100). It replaces the min(max($value, $low), $high) pattern that everyone writes backwards at least once.

Time\Duration is a proper type for a length of time, with nanosecond precision — like a stopwatch reading. Timeouts, polling intervals, elapsed time: things you used to store as a plain number of seconds or milliseconds now carry a type that says what they are.

Readonly properties can now have defaults. public readonly int $perPage = 15; works. Before 8.6 it was a fatal error, and you had to set the value in the constructor just to keep the property readonly.

Safer session defaults. On a fresh install, session.use_strict_mode is now 1, session.cookie_httponly is 1, and session.cookie_samesite is "Lax". Most Laravel apps will not feel this — Laravel sets its own session cookie behaviour in config/session.php. But if your app handles plain PHP sessions by hand, or depends on a session cookie surviving a cross-site POST (payment-gateway callbacks are the classic case), test login and payment flows before you upgrade.

JSON errors now tell you where the problem is. When a webhook payload fails to parse, the error says something like Syntax error near location 1:25 — the line and column, not just "syntax error".

And a few more, in short: a native polling API (Io\Poll) for async I/O, a URI builder so you stop gluing URL strings together, a SortDirection enum with Ascending and Descending, __debugInfo() on enums so dd() shows a readable label, and #[\Override] now works on constants too.

3. What changed after RC5

First, a correction to our own coverage: the RC5 article called RC5 the final release candidate. It was not. Two more followed, and RC7 landed on 12 November. RC7 also fixed an OpenSSL TLS use-after-free bug.

The bigger news came with the release itself. On 19 November the PHP project also shipped a critical security release — 17 CVEs, seven of them rated critical (CVSS 9.2). The fixes are in 8.2.36, 8.3.37, 8.4.28 and 8.5.13, and 8.6.0 ships with all of them included. Two to know by name:

  • CVE-2026-129289 — a PHP-FPM request-smuggling flaw. When the proxy in front reuses FastCGI connections, an attacker can smuggle in a second request and run code without logging in.
  • CVE-2026-126714 (phpAfterShell) — a flaw in the default file session handler that can let an attacker run code as the PHP worker.

If you are still on 8.5 or older, patch to the fixed version for your branch first. That upgrade matters more than 8.6 itself.

4. Upgrade today — in this order

1. Check the Laravel pairing first. Laravel 13 supports PHP 8.3 to 8.5. Framework support for a new PHP minor usually arrives in a patch release around GA day, so check the Laravel release notes for 8.6 support before you touch production. Do not upgrade production on day one and assume the framework is ready.

2. Try it in Docker, in one command. You do not need to install anything on your machine:

docker run --rm -it php:8.6-cli php -v

3. Run your full test suite on staging. Include the file-upload, payment, and login flows, with deprecation logging turned on. The full deprecation list and the commands to find them are in the RC5 checklist — this article does not repeat them.

4. If you are still on PHP 8.2, make a separate plan. Security support for PHP 8.2 ends on 31 December 2026. After that there are no more patches, even for critical flaws. Move those projects to 8.4 or 8.5 this quarter, and test 8.6 on the side.

The bottom line

PHP 8.6 is not a dramatic release. It is an ergonomics release: shorter callbacks, a clamp() you will use every week, a real duration type, and secure defaults out of the box — plus a round of deprecation cleanups ahead of PHP 9. Upgrade on staging this week, wait for the framework's 8.6 support to land, and then it is a normal upgrade day.

Dinesh Uprety

WRITTEN BY

Senior Software Engineer • Writer @ Laranepal • PHP, Laravel, Livewire, TailwindCSS & VueJS • CEO @ Laranepal & Founder @ laracodesnap

Discussion

Login or register to comment or ask questions

No comments yet

Be the first to share your thoughts or ask a question.

Join the conversation

Sign in to share your thoughts with the community.