Live data from Hacker News

Why Developers Hate PHP

jesuisundev.com

31–40 of 114 posts

Re: Why Developers Hate PHP

#31
post #21
post #17

> Most developers who hate PHP hate it out of elitism or ignorance. Either way it’s dumb. You have to choose a technology based on what you need. PHP is highly useful and powerful in many scenarios. And taking it out of the equation just because of its reputation is not a good idea. When I conduct hiring interviews, one of the questions I like to ask regardless of the language for the position, is the developer opini…

They might think you expect them to dislike it. Also, maybe they fear if they say they like PHP you'll take points off.

That goes for any question in interviews. I expect honesty and I'm straightforward about it.

Re: Why Developers Hate PHP

#32
post #6

I couldn't find a date on this article, but I don't think this line is accurate anymore: "Facebook, Wikipedia, Yahoo, Flickr, Tumblr all these sites run in PHP and welcome millions of users every month without flinching." Facebook dropped PHP for their own language called Hack, which I think is based on PHP but with a lot of the things people complain about changed.

FWIW I found this in the RSS feed for this site:

    Mon, 23 Sep 2019 04:05:19 +0000

Re: Why Developers Hate PHP

#33
post #17

> Most developers who hate PHP hate it out of elitism or ignorance. Either way it’s dumb. You have to choose a technology based on what you need. PHP is highly useful and powerful in many scenarios. And taking it out of the equation just because of its reputation is not a good idea. When I conduct hiring interviews, one of the questions I like to ask regardless of the language for the position, is the developer opini…

> It's not uncommon for some to start massive rant based on outdated or outright wrong statements about PHP.

If they make wrong statements, I agree, they shouldn't do that.

If they make outdated statements... well, what would you expect from someone who used PHP in the past and then stopped using it? Do you expect people to stay up-to-date on a language they no longer use? If so, why, and can you think of reasons they wouldn't?

Re: Why Developers Hate PHP

#34
post #3

PHP being awful annoys me so much more than javascript being awful. At least for the latter the use became mostly unintentional. For PHP, the problem is that it came about at just the right time to be picked up by WordPress and Facebook, hence encrusting itself in most of the web we see. I dislike WordPress the same way I came to dislike Visual Studio or any other monstrosity. It's a slow, massive, lumbering mess but…

> For PHP, the problem is that it came about at just the right time to be picked up by WordPress and Facebook, hence encrusting itself in most of the web we see.

That's backwards in my opinion. PHP was successful among non-CS-people, and those people started building things they were interested in. That gave PHP the initial success (especially on the web, were plenty of people didn't have a CS background unlike in enterprise software), which lead to people like Larry Sanger and Jimbo Wales using PHP to build their first version of Wikipedia. And it also lead to PHP being the go to thing for websites, pushing aside Perl, which meant that when Zuckerberg wanted to build a site for fun to rate coeds, PHP was a natural choice. Quick to build, easy to deploy, not a lot to worry about.

I'd be surprised if somebody back then planned to invest a huge sum of money and create some giant system and chose PHP. But PHP just being there, highly available, and people using it for all kinds of random stuff and then some of those things taking off and PHP just remaining at their core because of inertia, that's not surprising imho.

Re: Why Developers Hate PHP

#35
post #20

There is no web framework out there which comes with such elegant concepts, syntax and feature-richness like Laravel. I have seen them all - Laravel is incredibly good, especially for small - mid sized projects! And this statement comes from a python guy.

I'm convinced that Laravel and PHP are (literally!) best-in-class for the user-facing web layer of any HTTP based application.

The tooling, resources, first party libraries, and general ecosystem is VERY evolved, and the framework can makes you VERY productive.

Re: Why Developers Hate PHP

#36
post #3

PHP being awful annoys me so much more than javascript being awful. At least for the latter the use became mostly unintentional. For PHP, the problem is that it came about at just the right time to be picked up by WordPress and Facebook, hence encrusting itself in most of the web we see. I dislike WordPress the same way I came to dislike Visual Studio or any other monstrosity. It's a slow, massive, lumbering mess but…

I'm currently on a project building A CQRS system in PHP (not the first time) . I have no idea what you are basing this on.

he's basing it on PHP 10-20 years ago, just like the article explains. :P

Re: Why Developers Hate PHP

#37

I don't like having to hold 'shift' while pressing '4' all the time. Other then that I don't think the language is bad and where you cannot do what you're needing to do. If only I could get rid of the need for $ signs everywhere.

...and "->" to access a method or a variable. Maybe in PHP9

Re: Why Developers Hate PHP

#38

I don't like having to hold 'shift' while pressing '4' all the time. Other then that I don't think the language is bad and where you cannot do what you're needing to do. If only I could get rid of the need for $ signs everywhere.

at least you don't have $ # and @ to determine object vs list vs. hash map like perl5. :P

Re: Why Developers Hate PHP

#39

https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/ is a classic of this genre.

pick a random language, ruby, python, javascript etc etc and you'll find similar rants/complaints. Yet I think right now it's cool to shoot on PHP therefore everyone is more vocal

When someone gives you a long list of reasons why they hate something, why do you conclude they only hate it because it's trendy to hate it?

Re: Why Developers Hate PHP

#40
post #5

I know it's cool to hate PHP but I can think of other languages (Perl, VB6, Groovy) I dislike more. For a language to be so hated it has to be used a lot, and that's the primary virtue of PHP: it runs damn-near everywhere. Not only web scripting/apps but you can use it for shell scripting, Lambda/Azure Functions... there are even frameworks for creating native mobile applications with PHP. And I wouldn't be surprised…

> For a language to be so hated it has to be used a lot, and that's the primary virtue of PHP: it runs damn-near everywhere.

“Runs damn-near everywhere” is true of nearly all contemporary scripting languages, though, no? It’s definitely used a lot, though I don’t know how that compares to Perl, Ruby, Python... Without digging in harder, I still think it came at about the right time and had a killer feature: a dynamic nascent web with an incredibly low barrier to entry. You could create a form and ask for a persons name and have it respond “Hello, $name!”. I feel like it got entrenched and never gave that up.

Post reply on HN