Top
Best
New

Posted by netol 11 hours ago

What's New in PHP 8.6(www.php.net)
245 points | 119 commentspage 2
vdanielpop 10 hours ago|
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.

PetahNZ 10 hours ago|
I didn't notice any animations?
TimWolla 10 hours ago||
The page respects the `prefers-reduced-motion` media feature [1]. You might have enabled that preference.

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/A...

gregoriol 8 hours ago||
Designers should not design things that users want to disable
Timon3 8 hours ago||
The vast majority of people prefer animations. If everything got left out that anyone wants to disable, we'd be left with `return 0`, if even that.
mrob 8 hours ago|||
The vast majority of designers prefer animations. Without animations, there would be less jobs for designers. But I haven't seen any evidence that ordinary people prefer animations. Most ordinary people aren't even aware that it's possible to turn animations off, because the designers make this difficult.
jasonlotito 7 hours ago||
> But I haven't seen any evidence that ordinary people prefer animations.

There are mountains of evidence supporting the idea that people prefer animated UIs over static UIs going back decades. This is true even in the world of TUIs, again, going back decades. I genuinely don't understand how you can make this statement so confidently.

simondotau 6 hours ago|||
Maybe if the question is “hey was that fancy animation really cool?”

Animation, used judiciously to communicate valuable information about the UX, is good. Most of the rest is only tolerable so long as it doesn’t slow anything down or change how scrolling works.

mrob 6 hours ago||
A UI should be reactive rather than proactive. Any state changes should be explicitly requested by the user, who naturally knows what they requested, making "informative" animations redundant.

However, there is one legitimate use for UI animations: making it easier for spectators to follow what's happening. Spectators aren't the ones making the requests, so they can be confused if things happen too fast. Most computer use is not done for the benefit of spectators, so animations should be disabled by default, but it's beneficial to have the option of enabling them.

Timon3 1 hour ago||
> Any state changes should be explicitly requested by the user, who naturally knows what they requested, making "informative" animations redundant.

I can't really follow your thought process here for two reasons:

1. "Informative animations" (I interpret this as not-feedback-for-UI-interaction animations) are usually based on the response, not the request. So the user doesn't know the info which the animation communicates.

2. Most users immediately want some tiny acknowledgement of their request, e.g. a button's state changing (base -> pressed -> active/disabled). If the request takes longer than a few seconds, users really want a loading animation - otherwise they're less likely to wait until the response comes back, even if they know that it takes a long time. At least that's been my experience.

mrob 58 minutes ago||
We had functionally complete GUIs in the 90s. If something takes more than a few milliseconds to respond after 3 decades of hardware progress there's definitely something wrong.
Timon3 8 minutes ago||
If we're talking about local CRUD, sure, but that's a tiny minority of use cases. As soon as your application does network requests outside your LAN, less than a few milliseconds is impossible for most regular users and developers. That's not to mention tons and tons of processes that definitely take more than a few milliseconds, like: compiling a meaningfully big codebase, compressing/uncompressing most files, rendering a video, ...

Those are just a few examples. What is the "something" that's wrong with all of us?

edoceo 7 hours ago|||
Where can I find this evidence?
stronglikedan 5 hours ago||
Asking this in the age of AI says a lot...
nchmy 6 hours ago||||
i despise most animations. Its only something that "product people" want
Timon3 1 hour ago||
Again, the vast majority of people prefer animated UIs to non-animated ones. My own anecdotal experiences in building UIs and talking to end users over both short and long time frames supports this.
m4rtink 7 hours ago||
CVEs!
pryanshu89 8 hours ago||
[flagged]
Lalabadie 8 hours ago||
It powers more than half of the Internet's known websites (mostly thanks to Wordpress)
6510 7 hours ago||
Everything works just fine

https://phpbb.go-here.nl

tivatech 8 hours ago||
[flagged]
gg01 8 hours ago|
[dead]
zsoltkacsandi 10 hours ago||
[flagged]
ExtremelyFat 10 hours ago||
None of those languages allow me to edit files directly via (S)FTP and see the changes go live within 2 seconds.
throw1234567891 8 hours ago|||
For good reasons.
slopinthebag 10 hours ago||||
sure they do, i’ve implemented script-based handlers in go, rust, etc!
phplovesong 9 hours ago||||
Flashback to the 90s!
fabioborellini 9 hours ago||||
The real PHP way is actually ssh'ing to the server and editing with nano
minierpthrowawa 6 hours ago||
I have a small saas for construction companies. I run it on shared hosting with Cpanel. I have logged into namecheap, opened cpanel, gone to file browser, opened a php file via the file browser text editor, and fixed bugs in front of customers live. Only once did I forget to implement that same change on my actual official copy on my office computer.

There’s different skill levels out there. But if you can sell, you can still make a living with unsophisticated code and practices.

ModernTimes 2 hours ago||
Your comment will be objectionable to some, but you are living in the real-world, providing real value to customers.
evilduck 6 hours ago|||
Yeah, because we all realized that's a cause of trouble and pain and is not a feature to laud.
cutler 9 hours ago|||
Until another language reproduces the whole WordPress, Drupal, Magento, Moodle etc ecosystems PHP isn't going away.
cbeach 9 hours ago||
Are those ecosystems so important these days? They're mostly for human developer re-usability and ergonomics, right?

When I asked Claude to create a simple online shop the other day, I suggested it use an open source shop framework. Claude explained that Stripe does most of the heavy lifting, and implementing the shop site would be simpler if bespoke. So I let it do that and the result was fantastic. And also highly customisable (with Claude).

Times are a-changing.

speed_spread 9 hours ago|||
There are a LOT of PHP shops and they aren't going to rewrite working sites tomorrow. Even when they do, there's a good chance they'll guide their agent to keep using PHP because that's what they know. It's simple tech for simple use cases, human knowledge is still an important factor if you still value understanding what you're putting out.
fg137 8 hours ago||
> Even when they do, there's a good chance they'll guide their agent to keep using PHP because that's what they know.

Claude knows more about php than a random php shop. Or Go, Python etc.

6510 7 hours ago|||
I never use it but my php hosting provider has this wall of icons for one click install. No developer needed on that layer. LLM has the same disadvantages as writing it yourself or the hosting provider writing something themselves. It might have more features, make a better fit and be more flexible, it isn't [say] wordpress.
downsplat 7 hours ago|||
It has some historical warts but it's still a perfectly decent language with lots of modern features too. I quite like the semi-typed style, strong types for function arguments and returns, and duck typed within. Keeps things concise and well-checked enough. I just finished porting a 120kLoC project into php, and I'm quite happy with it. Using Slim as a micro framework, with a custom layer on top.
ulimn 10 hours ago|||
I see where you're coming from and I agree to some extent, but having a language (or standard library) rich in features also means we don't have to rely on third party solutions that much. I think this is a pretty good thing/approach - as long as it's well tested of course.
abujazar 10 hours ago|||
Obviously Go and Rust are more modern and performant languages, but they simply can't compete with the versatility of PHP and its ecosystem for a lot of use cases. Many web applications need a large part of the built-in functionality of PHP and one of its frameworks (Laravel or Symfony) in a tightly integrated application. Implementing one part at a time in Go or Rust is a viable option now for some, but far from all use cases. Time is better spent using that same LLM to use Laravel to its fullest.

Your career having moved on from CMS stuff in PHP is not really a good measure for what people actually need : )

phplovesong 9 hours ago||
To be honest, the PHP "ecosystem" is on par, or even worse than npm (javascript) is. I rarely see as low quality code as i have seen in php, 90-95% of composer packages are just horrible, and most would never pass our QA.

There is a handfull of "ok i guess we can use this" packages, but they also tend to be slow and java-esque horrible class based needles abstarctions all the way down.

abujazar 9 hours ago||
I don't think the availability of low quality packages is an argument against either ecosystem. What counts is the availability of high quality packages like the PHP-FIG ones as well as Symfony components and the Laravel framework.
br0ceph 8 hours ago|||
im not very familiar with web dev, but from what ive seen, most web dev packages are total poo.

i feel like this is due to being a get (rich) web scheme. promising quick development so that the business can startup quickly.

anyone else feel the same?

also thoughts on a minimal php subset just for basic interactivity, so that ur not running such a complex environment with so many security avenues

phplovesong 5 hours ago|||
Laravel? Is that the pinnacle of PHP? Its abstractions upon abstractions with LOTS of lipstick. Thats why a vanilla Laravel hello world app gives you something ridiculous like 600 req/seq thruput. How is this even on the table?
Shish2k 10 hours ago|||
I've been maintaining (/suffering) a PHP project for ~25 years, which started with PHP because it was the most universally deployable runtime available on bargain-basement web hosts, where a novice user can upload a file over FTP and immediately have a running webapp. Has any other language even attempted to fill that niche yet? D:

(Has the world bifurcated into "point & click configuration of proprietary web hosting like squarespace" for simple sites and "full kubernetes deployments" for more technical things, and nobody cares about entry-level deployment any more?)

mariusor 9 hours ago||
I think the static site generators with static hosting have become that. When there's interactivity needed, for most purposes, you can today defer to client side logic, so there's no real need for a backend in 90% of the cases.
ahofmann 10 hours ago|||
What is a better direction in your opinion?
shevy-java 10 hours ago|||
I agree with you for the most part; I think PHP went into decline several years ago already.

TIOBE, while useless, has a trend (there it is somewhat useful; still overall useless, but not 100% useless):

https://www.tiobe.com/tiobe-index/php/

It shows two big hits, one in 2010, one in 2014. I myself switched to ruby in 2005. Ruby is now in a similar situation too. PHP is at rank #12, so that is still decent. I think it is declining only slowly though.

> 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.

Well, the problem with LLMs is that these users will become dependent on e. g. Anthropic, and Anthropic already showed it will censor at will, e. g. "you are not allowed to 3d print anything that looks like a gun" agenda.

I do not think LLMs are what killed PHP or will kill it. The language is simply poorly designed. Not all projects will become LLM though, this is the part I disagree with you. For instance wikipedia will not suddenly be rewritten in LLM-Rust.

rowanseymour 6 hours ago|||
You're getting downvoted to oblivion but honestly I agree, I think the only reason anyone has for starting a new project in PHP in 2026 is familiarity. You cannot claim to be picking the best language for the job.
Shish2k 3 hours ago||
What's a better language for "can easily be deployed to any random web host"?
stevelacey 7 hours ago|||
[dead]
trippsydrippsy 9 hours ago||
[dead]
PaulHoule 43 minutes ago||
Love the partial function application syntax but it's a little scary to me that people are writing PHP scripts that use select, Xpoll, etc.
nticompass 7 hours ago||
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.

Jach 37 minutes ago||
Yeah, the most shallow "PHP bad" comments are pretty annoying, but they sometimes have a point, and there are always new programmers who don't know any history. One of the bug fixes I saw today was for an issue that's been around for 20 years and is another consequence of PHP's decision (IMO a bad one) to have a unified "stream wrapper" API such that functions named, for example, file_get_contents(), can be passed a URL rather than a file. If that URL was httpS or HTTPS (i.e. an uppercase S), then the bug now fixed was that PHP would ignore TLS and initially connect over port 80 and make the initial request (along with sending whatever else) over plaintext. It could also successfully follow a redirect to actual https but hide that it leaked data in the initial request. This is just such a PHP thing. I've at times acted the apologist for PHP, it was my first language over 20 years ago so I'll always have some fondness for it, but in my heart I do think it fundamentally sucks and can't be evolved to stop sucking.

The last time I did any professional work in PHP was probably 2012, though. Since then I've only maintained a couple things I originally made myself, and on rare occasions have written a standalone script or two (I think the last one was about 3 years ago) and it still makes me happy that I can just rsync things up to my site. Thankfully the maintenance work has been very minimal, but in contrast I've not been excited about any PHP changes since the early 5 days, and my upgrades from 5 to 7 to 8 were mostly just going "huh" (though sometimes "Eh? wtf") at the new features while being wary of breaking changes (the upgrade guides over the years have been helpful and there haven't been many breaking changes). When I look at modern PHP, it's structured quite differently to how my old waiting-to-be-rewritten maintenance sites are, and I don't like it, I just think it's become a worse Java, and most professional deployments seem to use a big framework and have a whole deployment workflow (vs. just copying a few files) so again why not just use a Java workflow that'll be at worst equally cumbersome but without all the PHP nonsense. On new language features specifically, I stopped getting excited over those in any language once I found my way to Lisp, where if you want some language feature, you don't have to wait for some committee to add it, you can just add it (or someone else has already added it, or it's always been there since before I was born). It's nice when other languages play catch-up, sure (though sometimes they implement something worse than not having it at all), but I can't ever muster excitement...

DJBunnies 7 hours ago||
Indeed, I started typing out a few replies only to delete them after remembering what you've articulated.

PHP (still!) rocks; I'm quite happy it's still relevant (and powers much of the internet.)

But I'm an old man who got into the language during the 3-4 migration around 2000.

krick 1 hour ago||
Ok, let's see what do we have in here.

Not a huge fan of partial function application syntax. Was it really necessary when you already have short anonymous function? What does it cost you to write that explicitly? Like, 10 extra characters? It is way more readable and clear what you mean when a variable has a name, not just `?`. WTF is `?`?

Pretty much the same for DocComments for params. Uh... why? I don't see anything wrong with the old way.

Duration class... well, we all already had duration classes in our projects, didn't we? It looks alright, but it's a real pity operator overloading isn't a native part of the language still. Why do we still have to `->add()` instead of `+`?

Similarly harmless but not hugely exciting are `clamp()` and `SortDirection`. The former isn't that hard to implement, but I don't think I ever did somehow, so thank you. SortDirection is literally just a built-in enum, not a huge deal. Libraries will still use their own implementations for a long time just to preserve back-compatibility.

Polling... Well, I'd usually opt for some other language instead of using PHP like that, but sometimes you need it.

Stream Error Handling and Readonly Defaults are great and overdue.

All in all, doesn't look to be a terribly exciting update.

pwmglenn 8 hours ago|
Partial application in PHP? WOW.
More comments...