Skip to content

Comment on CodeReddit: Cover UI for Reddit at Workparent

Comments

Hey look, it's someone who hasn't written any PHP since 2008!

Things have moved on. It's just another language.

Just because something has made tremendous improvements doesn't mean it's not laughably bad. There is no reason to write new applications with PHP in this day and age with the exception of protecting fragile egos of those who aren't willing to learn something better.

What features is it missing that make it such a challenge for you to write anything with it?

I have yet to see a substantial answer to that question, even with all the PHP bashing, of issues with PHP that actually matter in the real world.

That's because it's the wrong question. Adding features is easy. It's making them work well together that's hard.

Settle down, Beavis. PHP's a tool. It does a certain kind of job. People are allowed to use it. Bitching about it is like bitching about a hammer. "You can't even screw in a screw with it!" Indeed.

Watching people use PHP is like someone grabbing a rock and bashing nails with it. Sure it's a tool, but you still look stupid using it to hammer things.

Instead of using metaphors, just answer the question:

What makes PHP bad?

* implicit conversions * arrays are passed by value (by default) * poor performance * dollar signs everywhere * inconsistent function names * horrendous standard library * arrays are a mix of real arrays, hashmaps and other things * it keeps executing even after encountering errors

Overall the langauge reduces my productivity, encourages bad code and doesn't even perform well.

Thank you for having some real concerns with the language.

Some of these are addressed in PHP7. Performance is increased significantly, and exception handling has gotten some major improvements as well.

The encouragement of bad code I disagree with though, you can write bad code in any language. It isn't up to the language structures to force the developer into a certain way of writing.

For typing issues, there are strict modes as well, and type checking is something that's being improved in PHP7 again.

Why is PHP laughably bad?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.