The End of the “PHP sucks” Argument

By Deane Barker on May 21, 2008

PHP Sucks, But It Doesn’t Matter: Jeff Atwood essentially closes the “PHP sucks” argument by agreeing with it, then explaining why it doesn’t matter.

The TIOBE community index I linked above? It’s written in PHP. Wikipedia, which is likely to be on the first page of anything you search for these days? Written in PHP. Digg, the social bookmarking service so wildly popular that a front page link can crush the beefiest of webservers? Written in PHP. WordPress, arguably the most popular blogging solution available at the moment? Written in PHP. YouTube, the most widely known video sharing site on the internet? Written in PHP. Facebook, the current billion-dollar zombie-poking social networking darling of venture capitalists everywhere? Written in PHP.

Notice a pattern here?

Some of the largest sites on the internet — sites you probably interact with on a daily basis — are written in PHP. If PHP sucks so profoundly, why is it powering so much of the internet?

The only conclusion I can draw is that building a compelling application is far more important than choice of language. While PHP wouldn’t be my choice, and if pressed, I might argue that it should never be the choice for any rational human being sitting in front of a computer, I can’t argue with the results.

I’m actually beginning to like ASP.Net, but you have to wonder why very few of the big sites — on the scale that Jeff mentions above — are written in it. ASP.Net owns the enterprise, but I don’t see any of the Web 2.0 darlings rushing to it.

Say whatever you want about PHP, but it’s easy to do stuff in. Yes, it’s easy to do stupid stuff, but it’s easy to do about everything else in as well.

ASP.Net is Jacqueline Kennedy, while PHP is Marilyn Monroe. Sure, you couldn’t take Marilyn to a state dinner, but she was probably a hell of a lot more fun in general.



  1. What a terrible argument. You know what? If grossly polluting gasoline engines suck, why do most cars use them?! Huh, they must have something going for them.

    Oh, right, they’re leftover from earlier days and the cost to transition is huge.

    The reason places like Digg and Facebook are written in PHP is because they started small with no actual plan to be huge, and at this time their code and expertise investment is too huge to switch.

    So, yeah, PHP won’t kill a business. But if you’re starting from scratch with a plan for future growth, it’s still a terrible technology choice.

  2. But if you’re starting from scratch with a plan for future growth, it’s still a terrible technology choice.

    I completely reject that statement. Talk to Yahoo. They made choice after choice to use PHP even after they got huge.

    We’re writing a commercial app from scratch now, and we chose PHP over everything else. Are we just stupid, or are we fluent in nine different languages (Rails and .Net included) and decided that PHP offered the most advantages and the least drawbacks?

  3. Asp.Net owns the enterprise? Only if they are going out of business, have more money than sense, or I.T. isn’t an important to their business.

    Java and PHP rule the enterprise. Phone companies, banks, insurance, you name it.

    Asp.Net only rules in State Government. Which is why you have to use Internet Explorer to get your license.

    Why not Asp.Net?

    1) Being on Windows is too restrictive. Mono is a joke.

    2) Stability of the platform. It’s a complicated mess.

    3) Overly Complicate. Vista and IIS 7 aren’t helping.

    4) Ability to influence the platform direction. Vendor Lock-in.

    5) Ability to fix bugs in the platform. Windows is closed source.

    6) Tools: Visual Studio is good IDE when it works. But it’s only good for Asp.Net coding. I need a more flexible IDE.

  4. I just started PHP, and I think it’s great. I tried ASP.Net while I tried PHP, and I thought that PHP was MUCH better. There’s no way I’d pick ASP.Net over PHP. The great thing about PHP is simplicity. It’s so much easier than ASP!

    Also, I hate the closed source thing. That’s VERY annoying! PHP can do so much (simple to complex) without an extensive knowledge. I’m 15 and I can use it fine. Sure it’s not the main point of my website, but it’s good for password protection and upload scripts for me.

    I think that that “PHP compared to gasoline” bit is quite unintelligent. (That’s a real word by the way.) Gas hurts things, PHP doesn’t cause crashes or extra files etc. ASP.Net does. I just got a huge book on ASP.Net (2000+ pages) and almost half (850+ pages) of it is how to fix errors! I got an e-book on PHP which is 1200 pages and only 50-odd of how to fix errors! I’ve never gotten a PHP-engine caused error. The only time you get one is when you TRY to cause one. (e.g. BitChangers)

    PHP rules the marketplace. Plus it’s COMPLETELY free! Which is great :) Most webservers offer it too. I have a free hosting program (WAMP, powered by Apache) that I use to run my website, and PHP is built in! Because it’s free!

    PHP will win out, unless of course someone smart comes out with a new language. Maybe one of those people who own the open-source Linux platforms will make a web-enabled language similar to PHP that people can use at their leisure. That’d be great wouldn’t it?

    Ubuntu + PHP for the win! (Great for using as a server!)

    By the way I’m pretty sure that this site uses PHP.. Hehe..

  5. I just got a huge book on ASP.Net (2000+ pages) and almost half (850+ pages) of it is how to fix errors! I got an e-book on PHP which is 1200 pages and only 50-odd of how to fix errors!

    Cory — I’m pretty sure someone is going to turn this comment against you pretty quickly, so be forewarned. What you said here probably proved the exact opposite of what you were trying to say.

    By the way I’m pretty sure that this site uses PHP.. Hehe..

    Sort of. It uses Perl to generate PHP pages. It’s odd, I know.

  6. Actually, there is some merit to the PHP and gasoline comparison. In my (fairly extensive) experience, what PHP seems to have done is ‘pollute’ the web-applications industry with awful coding practices (OK, OK, I know that PHP didn’t do this and that the people using it did). I probably spend at least 80% of my development time having to do deal with horrific legacy code written by people who just picked up what they needed to in order to get the job done.

    And there is the problem. PHP usually DOES get the job done. Just. But if you are’t careful with it, you can write stuff that will force future developers (like me) to refuse to spend more than 4-6 months in a single job before they get sick of it and quit.

    God how I wish that Java had been the defacto standard used by everybody.

  7. God how I wish that Java had been the defacto standard used by everybody.

    You had me right up until the end there.

  8. I think the strength are also your weaknesses. In php cases since it does not restrict a programmer to code in a particular style, alos their isnt the peer pressure to follow certain coding style be it mvc or oops its easy to create messy code.

    php code doesnt suck, look at wordpress code, its clean and probably as good as anything you will see.

    If anyone sucks its the programmers who take the lazy way of writing bad code.

    But then again, since its easy for any average programmer to start programming with php its easy for startups to train and replace programmers when they do not have huge resources.

    Php has its place, it will always have its placed. Most starups that make it big will probably be php too.


  9. php code doesnt suck, look at wordpress code, its clean and probably as good as anything you will see.

    Yeah, I have to disagree with you there. WordPress is getting better, for sure, but traditionally it has been a huge mess. It’s one of those project that grew so fast and had so many contributors that the codebase just got clogged up with all sorts of stuff.

    Again, I know that WordPress is getting better fast, but I wouldn’t hold it up as a paragon of great PHP code.

  10. I’ve read so many posts on why PHP sucks. Well it isn’t sucking so much when I can kick out dynamic websites and collect a nice check in no time. For small to medium size applications I wouldn’t use anything else, because I know I can code so much faster in PHP = take on more work = more money.

    Now for critical/enterprise/military/medical/real time applications, I think you have to use a very tight true programming language. But for a flipping web site, come on, why kill yourself. Just use good practices and you will have a lot of happy customers and maintainable code.

  11. The Personal Home Page language (that’s what PHP was christened as) gives developers a simple means of mixing of procedural code with markup. It has a gentle learning curve, and it enjoys widespread support. It requires little or no programming skills to get started. Having said that, when a dynamic web page is simply the suface area of a complex underlying application, the lion’s share of the application should be written in a typesafe, object-oriented language, with a large eco-system of tools and class libraries. I certainly have no trouble with PHP or Ruby, but I’m also proficient in C# and Java and I don’t fall victim to the Golden Hammer anti-pattern: when you are a hammer, everything looks like a nail. I know where Java/C# shine and where PHP sucks, and vice versa.

  12. I used to code PHP web applications but when those applications grew bigger and bigger they got harder to control. Now I have decided to move towards ASP.NET and ASP.NET MVC due to the tools both these frameworks provide. I have worked with large companys and they had laughed upon PHP due to it being un-secure and makes allot of problems. PHP is for the novice programmer and ASP.NET is for the advanced programmer who wants to build large systems.

  13. Player haters, every one of you. Are you so mad that you figure out to program that you have to bash the programming language?

    Awww, poor babies, can’t type, have to drag and drop, awwww . . . .

  14. It does matter that PHP sucks, a lot.

    Facebook has to buy a front-end server to handle 200 requests an hour. That matters.

    WordPress is a mess of spaghetti code, that matters.

    PHP is responsible for the bulk of the security problems online. That matters a lot.

    PHP is a pile of inconsistent, irregular, non-orthogonal crap. That matters.

    PHP, ugly and unsafe at any speed.

    PHP: for amateurs, by amateurs.

  15. As a .Net developer I can tell you my earning power is quite a bit higher than that of a php developer given the same experience level. Just my 2 cents.

  16. programming elites all of immersed in your MVCs and object oriented patterns that you forget that it is possible to do all of this and more in php. If you are a developer worth your paycheck you can create secure scalable code in any programming language . Sure php allows you to write procedural spaghetti mess but there in lies the beauty of php.It is not elitist,it is democratic ,its free and its empowering. A kid in kenya can deploy his dynamic website using php mysql and apache for free. And talking about security…its not like facebook isn’t secure. I have nothing against j2ee or asp just that my Mac doesn’t really have a lot of support for deploying either of them and besides using either of them for anything less than enterprise scale architectures is a bit of an overkill :|

  17. That fact that a language allows you to write a pile of messy code is not a weakness. Javascript is a good example of how this is true. It has many flaws, so why is it used to drive some the biggest apps around? If you can create something that’s clean, powerful and extensible, who the hell cares what you use? Facebook, Wikipedia, Flickr, Digg etc.. show this can be done with PHP. So for those of you who have your misgivings about PHP, you’re missing the point. It’s not the car, it’s the driver. Incidentally I can’t believe someone used WordPress as an example for a good PHP application. It is not!

  18. After reading Kohana sourcecode I delved into WordPress guts and immediately a conclusion came up with strong evidence. WordPress is a mess (but really works) and Kohana code (php framework for innocents) is an example of elegance (but there is no project done in Kohana of magnitude order as Worpress itself). So what matters at the end ?

  19. gimp, vi, js, php and C for system specific calls is all you need for fast and enjoyable development.

    Java is the most distressing thing to happen to computing since MS-DOS. — Alan Kay

Comments are closed. If you have something you really want to say, tweet @gadgetopia.