Recently I’ve gotten back into PHP development with some personal projects and I came to a realization… php is not as bad as people consistently make it out to be.
Whenever I mention php with other developers, the responses are mixed but fall regularly along the following lines:
“I hate PHP… it’s awful!!!”
“PHP Sucks.”
“PHP is so difficult to work with, and there’s no concept of object orientation.”
“PHP is okay for small apps, but no one would seriously consider it for a large enterprise application”
Granted, there’s a lot I don’t like about php. I hate the fact that extensions are mostly implemented as functions in the global namespace. Functional programming is neigh impossible almost (and lets face it…. eval and create_function are kinda nasty). The OO cababilities do feel like much synthetic sugar.
But, despite it’s shortcomings, php is dead simple… I feel like even ruby has a bit more of a learning curve than php has… php is something anyone and their non-programmer cousin can pick up. And for those of us who are serious developers, there are plenty of good MVC and ORM frameworks out there to choose from. And despite the myths, it is pretty solid (although I’ve had to utilize caching systems in the past).
Maybe this is why a plenty of popular sites (Flickr, facebook, etc) use php rather than java or ruby on rails. I even noticed today that cnn.com uses wordpress (which is the blogging software I use) for it’s blogs.
I guess my general statement is, I’m tired of people hating so much on php. Sure, it’s easy to write spaghetti code with it, but the same is true with other languages (I have a 500 line jsp full of java code in CVS history at work to prove it), it’s just php probably gets more exposure due to wide use. Don’t hate it until you try it…. in all honesty, give me a choice between developing a site with PHP or Rubyit’d be a tough choice that would boil down to using PHP since the client probably already has it installed or has in house developers with PHP experience. Ruby on Rails is no magic bullet you know (flame on).


ooh, I know you’re going to draw down some painful comments from this one.
Hey, I won’t hate on PHP, I’ve used it before and it works. Having put that on the table, I will still say that given the choice between PHP and Ruby, I’ve always found ruby to be more pleasant to work with, so I probably wouldn’t follow you down that road. “Everybody’s doing it” is usually not a great reason to get on board (I know, because I took the DARE class in elementary school). ; )
Yep it sure will.
I like ruby a lot, but i’ve had a good experience with php. Still, fun to stir up some debate
Why doesn’t this blog has a preview button?
In any case, knock yourself out:
http://www.google.com/search?q=php+sucks&ie=UTF-8&oe=UTF-8
Especially see:
http://www.tnx.nl/php.html
Regards,
– Shlomi Fish
Sorry Shlomi… looks like I’ll need to add a preview button
James,
Does PHP have a good testing framework for objects and controllers?
I wrote a blog post Java vs. Ruby on Rails that you might enjoy.
Rob
[...] – bookmarked by 1 members originally found by TheGibson on 2008-11-04 Hey PHP Haters… http://blog.james-carr.org/2008/09/04/hey-php-haters/ – bookmarked by 5 members originally found [...]
I always chuckle when I see people compare ruby on rails to php. As if you can compare a core language with a framework built on a core language. It’s like comparing coaxial to ethernet. Morons!
Thanks, the php haters annoy me too. I’m sure they all spend exhorbent amounts of money on Macs and Starbucks with their many credit cards because they are unemployed.