Hacker News new | past | comments | ask | show | jobs | submit login

I’m genuinely curious about PHP because lots of people seem to really like it!

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?




PHP made it incredibly easy to build and deploy dynamic websites in an era when those things were not straightforward or widely understood.

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


Ah, so the footguns are still there? Nothing against it (I’m sure a seasoned PHP dev knows to avoid them) but I might pass. I’d be too unsure of myself for a while while I get comfortable with the language.


Some are gone, some are not. In most cases the style checkers and linters will warn you about them pre-emptively.

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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: