Hacker News new | ask | show | jobs
by simias 3354 days ago
I think that's unfair, the reason PHP has a bad reputation is not because of silly hipsters. It's because for a long time it was a terribly designed language. It was a laughing stock for a good reason. The whole "hobby-grade templating language turned general purpose with complete disregard to how programing languages are designed" thing.

Now I'm willing to believe that it's improved a lot since then, but it's got a very bad reputation to overcome, and it's deserved. The languages seems headed in the right direction at least, maybe in a few years we'll forget what PHP used to be.

3 comments

I'm pretty sure a substantial part of PHP's reputation is the nightmare code produced by PHP developers.
And that goes right into the whole "badly designed language" trope as well. Essentially, anything written in PHP prior to version 5 (and especially prior to version 4) should be considered suspect.

I'm a long time PHP developer (well, was until recently - my current position is in the javascript/nodejs stack arena), and have been using it since the v3 days (so not there from the beginning, but close enough). There were some truly awful examples and code practices out there.

That isn't to say you couldn't write quality procedural PHP back in the day (had you configured your server properly and stuck with "best practices") - it's just that the majority of people hacking on PHP didn't. I'm sure there were a few that did, though - but I'm hard-pressed to recall any at the moment.

Today's PHP is a much different beast than yesterday's. The OOP model and other advancements makes things so much better, provided they are all used properly and followed. Now - could you make PHP 7 as ugly as 3? Sure. But you'd be insane to do so unless you had no other choice...

Nail, meet hammer with claws on both sides.

It's entirely, 100% possible to write good, clean, tested, maintainable code in PHP. But most people working with PHP, for whatever reason (and I'm sure there are many reasons), simply don't bother.

I suppose the same can be said of all languages, but PHP devs are the worst offenders IME.

Agree with you, and let's not forget that JavaScript has similar origins.
Lets not forget that Javascript still has a lot of the issues that PHP has now finally overcome.
I haven't touched PHP in years, but I am hearing it's supporting stricter type checking, which is promising.