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

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

reply