This site provides a nice overview, cool. It makes me wonder though, because IMHO PHP is adding too much new features that are often somewhat half-baked. What would be better is to have an actual specification to improve the core language. IIRC, Python gradually adds features where they are opt-in first (from __future__ import foo).
I'd gladly take a language which offers stability and gradual improvement over a language that just keeps adding new toys to play with. The software development cycle can take many years and from my experience, changes in the language or runtime are a burden.
But my biggest gripe isn't with PHP, it's that cheap web hosting still comes with PHP and MySQL. And I honestly can't blame them.
I am working on a ~10 year old PHP project, the amount of changes that needed to be made in the last decade because of the changes in the language are almost non-existent.
But using new features is nice and makes the code better, there are even projects (rectorphp) that can automate using of new features in the existing codebase.
The only time I've ever had to update legacy code due to a breaking change in PHP is when an old encryption algorithm was withdrawn and I had to write a migration to decrypt and re-encrypt the data we'd originally encrypted with it. Apart from that (and a few notices sent to Sentry) it's been smooth sailing over the years.
upgraded a large badly written php 5.6 codebase to 7.1 then 7.4 and then 8.0. first jump took about 3 days of work to iron out issues then going to 7.4 and 8.0 was even quicker. using the php compatibility checker helped a lot.
I agree. I learned PHP at the time of PHP 3 and then 4. It was my first programming language. I grew critical of it as time passed and, like most people, made fun of its lot. But its ease of use and ubiquity still made it practical for some small projects in the following years (mid 2000s).
Then, in 2014, I got a job where PHP was the main language and I was surprised it had improved so much (though I left around a year later and haven't done any PHP since). I find it very impressive that they've been able to address many of the criticisms they received and that they keep introducing concepts that are popular in other languages, all the while mostly starting backward-compatible.
I probably still wouldn't pick it for a project—simply because there are other languages that I prefer or would like to learn—but I respect it a lot more than I used to and understand why many like it.
I'd gladly take a language which offers stability and gradual improvement over a language that just keeps adding new toys to play with. The software development cycle can take many years and from my experience, changes in the language or runtime are a burden.
But my biggest gripe isn't with PHP, it's that cheap web hosting still comes with PHP and MySQL. And I honestly can't blame them.
/rant