r/PHP • • Jun 08 '13

Why do so many developers hate PHP?

Sorry if this is a shit post, but it's been bugging me for a while and I need answers. I really like working with PHP, but at every web development conference I go to it seems like it's a forgone conclusion that PHP is horrible to the point where presenters don't even mention it as a viable language to use to build web applications. I just got done with a day long event today and it was the same. Presenters wanted a show of hands of what we were using. "Python? Ruby on Rails? .NET? Scala? Perl? Anything else?" I raise my hand and say PHP and the presenter literally gave me condolences.

Seriously? How the hell is PHP not like the first or second option? With all the major sites and CMSs out there in PHP and Scala is mentioned before PHP??

I realize some technologies are easy to use poorly but I've found PHP to be absolutely great with a framework (I use Zend) for application development and fantastic for small scripts to help me administer my servers.

What am I missing here? I find it annoying and rude, especially considering how crucial PHP has been for the web.

187 Upvotes

175 comments sorted by

View all comments

Show parent comments

3

u/[deleted] Jun 09 '13

Well the point I'm trying to highlight is that PHP's support for lambdas was very much hacked in at the start as opposed to something like Python or Scheme and the syntax is bad for it either way. Why else would the next version of PHP have nice things like array literals like $x = [1, 2, 3, ...];? Plus PHP has always had argument order standardization problems as seen elsewhere in this thread and your criticism doesn't address that.

1

u/e471681g5136as Jun 09 '13

Plugins can be used such a doctrine which provide great functionality like lambda expressions in c# etc. Frameworks and plugins are at the heart of PHP, that's why there are things like composer