What's New in PHP 8.6
netol
284 points
130 comments
November 19, 2026
Related Discussions
Found 5 related stories in 195.3ms across 13,334 title embeddings via pgvector HNSW
- PHP 8.5.13 petecooper · 62 pts · November 19, 2026 · 71% similar
- PHP 8.5.12, 8.4.27, 8.3.36 and 8.2.35 out timvdalen · 276 pts · October 21, 2026 · 69% similar
- PHP 8.2.35 tuyuri · 993 pts · October 21, 2026 · 69% similar
- Upcoming Critical PHP Security Release hypnot · 33 pts · November 18, 2026 · 61% similar
- Upcoming Critical PHP Security Release choult · 117 pts · October 20, 2026 · 61% similar
Discussion Highlights (19 comments)
beberlei
Most excited about the ZTS overhead reduction. If you are unfamiliar PHP can run either with or without thread safety (think using pthreads in PHP requests). If the overhead can be further reduced (and people have ideas) then it could be that we only need ZTS mode anymore in the future and that can open up one avenue for PHP to get native async support similar to the existing parallel extension: https://github.com/krakjoe/parallel More "hands-on" is the stream error handling improvements. This greatly improves the old file stream APIs to now allow throwing exceptions instead of returning false on errors: $context = stream_context_create([ 'stream' => [ 'error_mode' => StreamErrorMode::Exception, ], ]); try { $config = file_get_contents('/etc/app/config.json', context: $context); } catch (StreamException $e) { // handle error }
kijin
Before you all get excited about the new version, patch the old version you're running now! The PHP team announced that they're going to release a critical fix between 14:00 and 14:30 UTC today. Doesn't say whether 8.6 is affected too, but the vulnerability is probably at the top of their mind right now -- even more so than the 8.6 release.
vdanielpop
Can we not have animations that slow down my scroll on these kinds of pages? It's so pointless. Edit: Thank you for pointing out the `prefers-reduced-motion` media feature, I did not have that enabled.
majestic5762
What's New in PHP 8.6? - no RCE
origini
Ah yes the clamp() function good thats in
phplovesong
Still no builtin unicode support? What the hell is this? A web language that does not default to unicode, thats pretty weak for a language in 2026
HackerThemAll
> What's New in PHP 8.6 New CVEs/RCEs? https://www.php.net/archive/2026.php#2026-11-18-1
rarisma
Perhaps it will contain something new that will come back to haunt us in six or so months.
shdon
I guess the clamp function really is needed, as even in their release notes, they did the clamping using min/max incorrectly. Their PHP8.5 examples are written as: var_dump(max($value, min($lower_bound, $upper_bound))); but that should be: var_dump(max($lower_bound, min($value, $upper_bound))); /facepalm
pwmglenn
Partial application in PHP? WOW.
durmusk
Hopefully not another php2shell
nticompass
I /finally/ just upgraded our PHP app from 7.4 to 8.3 (totally not just because of the PHP vulnerabilities). I can't wait to jump to 8.5, so I can use the pipe (`|>`) operator. I'd love to upgrade to 8.6 so I can use function partials!
nticompass
Gotta love all the "PHP bad" comments that appear on any PHP post (regardless of what it's about). I, for one, am I excited about this release. Modern PHP (php8+) is pretty nice and a lot of the old "PHP bad" issues from back in the day are non-existent. Though, I guess I've been a PHP developer for a long time now. Professionally, since 2012 and has a hobby years before that. I refuse to stop learning/using PHP! Yes, there are other web server languages. Yes, PHP had its issues. Yes, legacy PHP can be pretty awful (ask me how I know). But, it's not going anywhere and all the "PHP bad" comments are not helpful.
AuthorizedCust
Why is this language still around? I get the popularity and installed-base arguments, but I shudder when I see the code.
williamdclt
I can't make up my mind on FPA. On the one hand it's very elegant and I always feel like I need it when writing code, on the other hand it makes a function declaration look reaaaaally close to a function invocation, which is super confusing
jmyeet
I'm honestly disappointed at the number of snark comments on HN about PHP. It's like posting 2007 memes. Yes, we all know the story of htmlspecialchars(). We can make fun of "global" when we don't realize "global" actually means "request scoped". We get it. I've always viewed PHP as having these ideal features: 1. A stateless functional core. It's cheap to run and quick to start. Compare this to Java or even Python. There's no loading a bunch of class libraries; 2. Every request has an environment created then torn down. That means it's hard for a given request handler to leak memory or other resources. You compare this to, say, Java's servlet API (which only really existed because the startup costs were too high) where resource leaking is a real problem and then you get into GC and STW pauses; and 3. Every request is single-threaded. This is ideal. Async network/IO requests are handled via extensions. You should never need to spawn a thread in a request handler directly. You eliminate a whole class of bugs by doing this. Is PHP perfect? No. The class separator as the backslash still offends me more than a decade later. I really wish Facebook's Hack had become PHP because it's got a vastly better type system, core collection classes (list, vec, dict) and it did things a decade ago that PHP is only added with this release (eg polling). As for partial functions, the use case seems to be versioning? I actually prefer the Javascript polyfill method here where possible. Don't make users care about this kind of stuff.
p4bl0
I'm a bit sad that there's still no way to limit the number of arguments of a user-defined function in the type system. The internal functions have that. I know that introducing such a behavior by default could break existing code, but it seems relatively easy to introduce this feature in a backward compatible way by using the void type. For example : function foo (void) {} foo(42); // fatal error: foo() expects exactly 0 arguments, 1 given function bar ($a, $b, void) {} bar(1, 2, 3); // fatal error: bar() expects exactly 2 arguments, 3 given function baz ($a, $b=null, void) {} baz(1, 2, 3); // fatal error: baz() expects at most 2 arguments, 3 given
petecooper
Source tagged: https://github.com/php/php-src/releases/tag/php-8.6.0
yabones
Appears the big scary vulnerability that was announced recently is in 8.5+, so definitely upgrade your stuff if you're on a new version... For the rest of us in "debian land" running 8.3-8.4, looks like there's nothing to worry about for now. https://github.com/php/php-src/security/advisories/GHSA-8mjj... https://github.com/php/php-src/security/advisories/GHSA-2fjv... The other Critical CVE looks very very difficult to actually exploit, since it has to do with a very specific configuration during startup. https://github.com/php/php-src/security/advisories/GHSA-gr4f...