Is it like C++, in the sense that there are still a lot of footguns but people who invest the time to know where they are grow to like the language? Or have they actively removed the bad APIs in recent versions?
Is it like C++, in the sense that there are still a lot of footguns but people who invest the time to know where they are grow to like the language? Or have they actively removed the bad APIs in recent versions?
The fact that it's a pretty poor language under the hood was irrelevant, because almost anyone could pick it up and intuit how its (crummy) built-in templating worked well enough to get the job done.
Its popularity was largely rooted in how easy it made it to Get Shit Done.
Sure, there were near-apocalypse level footguns everywhere in the first four major versions, but those didn't get noticed until the project had been mostly-working in prod for months.
It got first mover advantage due to that, and that sort of lead dies off very, very slowly.
These days PHP has mostly evolved into Java-lite, with some pretty decent frameworks and tools to keep you far from the footguns lying all around due to backwards compatibility, and CLI tooling to pre-emptively warn you when you've stepped on one (not unlike ESLint or TypeScript, really, which are both projects to make using JS less dangerous).
At least, that was the state of things last I looked. I haven't touched PHP in probably two years now.
Of all the languages I've worked in, it's my least favorite. Well, it's neck and neck with Java.