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
}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 givenSource tagged:
https://github.com/php/php-src/releases/tag/php-8.6.0I /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!
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
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.
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.
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.
[dead]
I hope they fixed the security issues it had
I know there were many "PHP is dead" posts in the past, but I think PHP now is really is declining.
I started my career as a PHP developer, it was a popular language especially in web development and at web agencies, and the main reason was that it was relatively cheap to employ PHP devs.
Now with LLMs it is similarly cheap (if not cheaper) to write code in Go, Rust, or any performant languages that are much more sophisticated than PHP and have many other benefits. I don't see any reason anymore to start any new project in PHP.
Other than that this "borrow every single feature from other languages and add it to PHP" strategy is not really a good direction IMO.
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.
Why is this language still around?
I get the popularity and installed-base arguments, but I shudder when I see the code.
Partial application in PHP? WOW.
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)));
/facepalmHopefully not another php2shell
> What's New in PHP 8.6
New CVEs/RCEs? https://www.php.net/archive/2026.php#2026-11-18-1
Ah yes the clamp() function good thats in
Perhaps it will contain something new that will come back to haunt us in six or so months.
What's New in PHP 8.6?
- no RCE
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
Don't forget the new vulnerabilities that AI will find :).
It would be nice if PHP would no longer have bugs that allow attackers to take over a webserver.
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...