12 ms·
Ewww, You Use PHP?
http://www.mailchimp.com/blog/ewww-you-use-php/
- btilly 16y agoI can say without doubt that it is the most sophisticated framework for this environment that I’ve heard of except for perhaps what Facebook uses. He hasn't heard of Google? :-P
- ryanwaggoner 16y agoUh, does Google use PHP? I think that's what he's referring to.
- btilly 16y agoDefine "this environment". I took it to mean handling large amounts of mail, in which case the gmail team has one of the most sophisticated frameworks, period. As for using PHP, I'm sure it is used somewhere, but it is not a popular language at Google. Most Google developers have better taste than that.
- billpg 16y agoIs it good software thanks to PHP, or in spite of PHP?
- dools 16y agoIt's good software in spite of the difficulty of creating such a system in any language. It's good software in spite of the inherent difficulties in creating software. It's good software in spite of computers.
- ElbertF 16y agoBecause rewriting it in a different language automatically makes it better software..? I don't think the language really matters.
- wvenable 16y agoPHP really just isn't that bad. It's quirky but it's also quite capable.
- nir 16y ago"Despite its popularity, PHP is considered by the programming elite, almost without exception, as one of the worst languages currently in use today" I would say, the blogging-about-programming elite, rather than the actual programming elite. I haven't coded PHP in years, but some of the most brilliant devs I know use it when it fits the task.
- injekt 16y agoI kind of agree. But I still find 90% of extremely talented programmers breath a sigh of relief when they find they're not having to use PHP. Even for web development. PHP was great a few years ago, and by great I mean "one of the only options". PHP is active on every shared web host around. It's the norm. Only recently have the likes of Ruby and Python become popular on shared hosts. Personally I think that's fantastic.
- nir 16y agoAlso, AWS/Heroku/GAE give you non-shared-hosting ways to deploy. Still, another tool in the box.
- pavs 16y ago63.5% of stats are made up on the spot.
- davidwparker 16y agoHe did say "But I still find 90% of..." as opposed to "90% of..." making it an opinion, not a pure statistic. edit: that's not to say he didn't make up the statistic for his opinion.
- derefr 16y agoPHP is a programming language (that is, a formal grammar for specifying the operations a computer should perform), but also an implementation of an interpreter for that grammar. You're talking about the implementation, which is of fair quality (certainly better than, say, MRI Ruby) and very widely-deployed, a combination which many devs (brilliant or not) take advantage of. People who say PHP is badly designed, however, aren't talking about the implementation; rather, they're strictly talking about the language itself—the syntax, the semantics, and the standard library. There is no advantage to the way PHP-the-language does things; it makes nonsensical choices (like the flat, disorganized, all-libraries-included function namespace, the inability to chain method calls in a single expression, the extreme amount of "weakly-typed" cruft surrounding the comparison operators, etc.) which derive no benefit. It would be strictly beneficial to the programming ecosystem if PHP-the-language were treated as an object-code for other, better-designed languages to target, such that PHP-the-implementation could be used without needing to write in PHP.
- pirko 16y agoLink to the actual blog entry: http://www.mailchimp.com/blog/ewww-you-use-php/ http://www.mailchimp.com/blog/ewww-you-use-php/
- ucheokeke 16y agoWhat's so bad about PHP? I’d assume the goal in web development is the end product or service and not the means to it. It seems easy to miss the forest for trees, and delve into cult-like arguments of whatever software stack is hip.
- deleted 16y ago[deleted]
- rtp 16y ago> I’d assume the goal in web development is the end product or service and not the means to it. I don't think I agree. The end product's possibility to be exist at all depends on the mental health of your employees, how efficient they are, and what tools they use. Someone who is unmotivated due to using a language or a tool that is horrible will work only on work morale as a resource for motivation, and it's only a matter of time before that resource runs out, and they'll start feeling miserable and perform sub-optimally. I don't have an opinion on PHP, although I've made a few cool things with it and enjoyed coding in it, so I don't think it's necessarily that bad.
- corin_ 16y ago"So before you jump on that bandwagon thinking nothing interesting could possibly be done with PHP, think of us (or Facebook)." Before I jump on this bandwagon I think I'll forget all about mailchimp, and think about all the many, many, many great companies (such as Facebook) that use PHP.
- staunch 16y agoWhy not transition to a different language over time? One that more great programmers want to use? There's no reason they couldn't (over the course of years) move to another language. I'm not suggesting a total rewrite, but they could start writing entirely new subsystems in a new language. It's very rare to have 100% of your code in one language anyway. Recruiting great programmers is one of the most important things in a software startup. Why stick with PHP if it makes that far more difficult?
- shin_lao 16y agoProbably because you overestimate the added value of Python and Ruby over PHP and underestimate the cost of language migration. Language is not that important. Your engineers are. They will easily compensate for suboptimal tools. The best hint for this is that most (>70%) of the money goes into salaries. Not software. Not hardware. Not office space. Salaries.
- olalonde 16y ago> Language is not that important. Your engineers are. They will easily compensate for suboptimal tools. That's exactly his point: it's much harder to find great engineers who want to use PHP. Disclosure: I'm a PHP developer who has had to hire PHP developers in the past.
- shin_lao 16y agoI disagree with this. It shows a lack of maturity to reject a job over a specific tool.
- msie 16y agoWhy take a job where you would be working with a language that makes you miserable? It would be bad for both you and the company when you leave in several weeks.
- billpg 16y agoI've turned down a job before specifically because I didn't want n years using MUMPS on my CV. (Okay, they didn't actually offer me the job, but I would have turned it down anyway.)
- cosmok 16y agoI use PHP at work for creating not only web applications but, also to do a lot of non-user facing backend stuff. It's great to know that someone out there is using PHP at a much bigger scale for backend stuff.I hope he shares more technical details. If you don't like PHP, fine, but, don't think all PHP programmers are stupid. I once had a Python programmer looking at the kind of stuff that I was doing with PHP and he was surprised that such things could be done in PHP. This is an actual conversation that I had in a meetup: Guy1: If PHP were to disappear, it would bring down a lot of the web with it, wouldn't it? Guy2: Nah, but, that would be the case if Java or .net were to disappear. Me: (to myself)Wtf! Guy1: But, most of the links that I click on the web end with .php. Guy2: um..... Me: (to myself)pwn3d!
- derefr 16y agoI wouldn't say that anyone has the impression that "all PHP programmers are stupid." Rather, it's more that PHP, on top of attracting O(N) competent developers like any other language, also attracts O(k >> N) marginal developers who barely know enough to get off the ground, and couldn't really manage to code in any other language. When you randomly select a "representative" PHP coder (such as by listing "knows PHP" as a criterion for resume submissions), you get a marginal one.
- cosmok 16y agoStupid was a bit too strong, but, I stand by what I said based on my experience. Articles like these exist partly because of the belief that PHP programmers in general are not competent. You do not hear such frequent rumbling on Python and it's practitioners. One could apply the same O(N)and O(k>>N) logic there as IMO, Python is not harder to learn/program in compared with PHP.
- Raphael_Amiard 16y agoI think you can write good software in any language. Moreover, PHP is a powerful language, in its last versions at least, it's just that the way it has been developped would make anyone serious about programming language developpment vomit. But that's not really a problem. I guess the problem is not that good devs can't code in PHP. And when they focus on the task at hand, they might not even notice. Because PHP has everything you need. I'd prefer coding a website in PHP than in Java, C, or C++, because PHP is dynamic, has first class functions and the kind of stuff you need to be expressive. One of the problems is that if you think too hard about the fact that the language you use is suboptimal, it will affect the pleasure you take from doing your job. The other problem is that a lot of PHP code is really horrible, so people have grown to associate PHP with bad code.
- thenbrent 16y agoI used to be in the "eww, PHP" crowd, but only until I really started using it. It doesn't have to be the security blackhole or spaghetti monster it's made out to be.
- lowglow 16y agoI agree. Every language is as good as the programmer that uses it.
- joelmichael 16y agoI am a Ruby on Rails programmer from the early days. It is my platform of choice. And yet, I still have massive respect for PHP. For me, it's the next best option. I worked in PHP for five years before I worked in Rails, and I think PHP is a great language for web development.
- roel_v 16y ago"I think Rails is a more modern platform. I think PHP is not the ideal choice. But I think PHP is a great platform." Yeah but here's the rub. You can't compare Rails with PHP. You need to compare Ruby to PHP, and ask if the switching costs will outweigh any deficiencies; and you need to compare Rails to e.g. Cake or Symfony or similar, and ask if one language provides a framework whose advantages are so compelling that they too will outweigh those switching costs. I have yet to be convinced. (weighting factors may apply for dev experience with one or the other, legacy code, hosting/infrastructure support, etc.)
- joelmichael 16y agoI don't think something like Cake is a good comparison for Rails, and it's honestly not how I think of PHP. Developing in PHP is making a collection of functions and custom made classes hacked together, in my mind. I know there are frameworks, but if you're going to use a fancy framework, you'd might as well use Rails. I wouldn't develop in Ruby without Rails, but I wouldn't develop in PHP with a framework.
- wvenable 16y agoI don't like rails. When I do web development, I do it in PHP, and I avoid PHP rails-like frameworks as well. I prefer more control and most of projects don't fit into a nice box for rails.
- deleted 16y ago[deleted]
- pornel 16y agoPHP's warts are shallow — syntactical quirks, disorganized standard library, idiotic config options. In practice you disable stupid options, don't use quirky parts of the language, set up your IDE to autocomplete functions, and PHP stops getting in the way. What you're left with is a decent OO language, which recently got namespaces and closures. It's OK speed-wise (with APC) and has got stable implementation.
- brisance 16y agoPHP-powered sites accounted for a lot of vulnerabilities through the years. Part of it was due to its popularity (like VB was back in the day), but part of it could also be blamed on certain design decisions e.g. register_globals.
- vog 16y agoThat true, but also consider that the especially idiotic "register_globals" has been disabled in PHP for many years. If people are still enabling that manually, it is solely because they use very outdated scripts which depend on this. Then, however, the real problem is relying on those crappy old scripts, and not the usage of PHP itself. On the other hand, there's still other stupid stuff like "magic_quotes_gpc" that has only recently been deprecated.
- pornel 16y agoFor new development you should disable all legacy/noob options, enable all error reporting and use PDO with prepared statements. If you have application that relies on register_globals or magic_quotes, you can assume it's vulnerable. PHP allows enabling these on per-directory basis, so at least you can somewhat isolate the legacy code.
- vog 16y agoAlso note that the Zend-Framework for PHP became mature in the last few years, which also helps a lot to get over PHP's deficiencies.
- 16y ago
- brisance 16y agoThe "cool factor" of a language is inversely proportional to its popularity.
- magamiako 16y agoPrecisely!
- voidpointer 16y agoJust like with everything else...
- bcosca 16y agohuman progress was never a result of religious fanaticism. sticking to one language because it is the "one true language" is a lot of crap.
- code_duck 16y agoThis would be a reasonable defense of PHP if it didn't genuinely lack any sort of intelligent design. More sophisticated programmers hate PHP because it was thrown together like a Mad Max car. PHP is popular in the same way Miller Lite is popular: it's convenient, cheap to run (on shared hosting) and adequate. However, if you're used to something finer, Miller Lite simply will not do, and people who think it's fine are not going to understand.
- nadam 16y ago"So before you jump on that bandwagon thinking nothing interesting could possibly be done with PHP" The problem is not that nothing interesting can be done in PHP. Lots of interesting can be done in any Turing complete language. It would be just 'plus points' if you would use for example Scala for the kind of task you described. I just cannot see why to use a dynamic language in a task where performance is important when there is a statically typed fast language which is as good and as concise as Scala. It is not that it is impossible that I would join a company developing in PHP. We have to make compromises all the time. It is just that developers evaluate companies, and join the one with the most 'plus points'.
- igorgue 16y ago"Get out of languages, platforms that's the important thing" - Zed Shaw said something like that a while ago
- hackoder 16y agoWhat you need to understand (and most of us hackers too) is that there is a difference between the 'hacker' and 'get shit done' mentality. Programming is something I've done for the last 10 or so years (in various forms). It is essentially the only activity (in terms of 'work' or career) that I enjoy. The engineer in me just enjoys making things 'perfect' (where perfect is a definition perhaps only I understand, but generally its something built on solid engineering principles. Well-tested, reliable, modular, efficient, etc). When code looks 'just right', I enjoy the code regardless of whether it is bringing me any $$$. In that sense, for me, engineering is a fun activity, and not 'work'. The hacker in me will enjoy a well built piece of software for its engineering brilliance regardless of whether the software got anything done at all. In the last year or so I've been able to isolate these personalities and perhaps merge them. I do not scold the hacker just because he wants to try out new languages every month and is opinionated about his favorite ones. I get pissed off when this stops him from getting shit done. I'm glad for the hacker in me who cares deeply about the tools (languages, IDEs etc) that he uses. Its this hacker that makes my job 'fun'. It is this hacker that has helped improve the quality of my code and my thought process for building good software. The 'getting shit done' would never have been enjoyment enough if it were not for the hacker.
- pilif 16y agoI'm maintaining a huge web application mostly written in PHP. We (well. back then it was just me) began doing this back in 2004. Back in 2004, PHP was a very sensible solution: It was the language I knew best (we had little time for the project, so going with a language I knew felt sensible), it was easy to deploy and back then, there weren't that many alternatives anyways: Ruby was in its infancy, for Python you had thread safety issues with mod_python or you went CGI, Java was and continues to be just ugly. JavaScript back then was still just a toy language. No Node.js or anything. That would have left me with mod_perl, but looking at where we are today, that would have been an even worse decision it seems. Fast forward 6 years. The application consists of over 100'000 lines of PHP code alone now. It's in production use for many customers which serve tens of thousands of end users. It's not only a traditional web application, it also serves as an API for custom-made tablet pc applications (before we had the iPad), for GPRS-connected barcode scanners and last, but not least, for native Windows Clients (all developed by our company, using various languages). While I really hate some aspects of PHP by now and I would love to have a Ruby or Python codebase to work with instead, rewriting all of this is out of the question. Customers depend on this to work exactly the way it works now (they panic even if a link is two pixels off - welcome to the enterprise). While I might be able to exchange some components with something else, I don't see the benefit it would provide - it would do nothing but make maintenance harder because I'd add another dependency to keep track of. The only thing I could do is rewrite the thing. But by now, there's more than 30 man-years of work that went into this. Sure. Redoing it wouldn't take the same amount of time, but considering it would have to look exactly the same (probably I couldn't even get customers to accept different URLs), where's the point in that? OTOH, despite being done in PHP and tailored to sometimes crazy customer requirements, the code base is sufficiently clean to work with and it's constantly improving. Bad parts get factored out, good parts arrive, so it's not all-bad. We are embracing new technologies as they become available and fit our product. Our CSS is now written in SASS, we moved from pure DOM scripting to Prototype to jQuery, we make use of the latest features of PHP (now Closures and anonymous functions from 5.3) and of our database (constantly running latest Postgres). Even though it's PHP, it can still be fun. Considering recruitment: Granted. It might be harder to convince a good programmer to work on this "ugly" PHP project. But a) we are not just doing PHP (just mainly), b) the code base is, as I said, quite clean and c) even though the code base might be in a language you don't like, the basic concepts of our profession still apply. You can still discuss and solve interesting problems and you can still create great solutions to these problems. If you don't want to take part in this adventure just because you don't like the language this is done in, then, frankly, you are not the person I want to hire. Even though programming is the coolest thing you can do on this world, it's still a job and not everything can always be unicorns and rainbows. If you can't see this, then I don't need you.
- csomar 16y agoI really don't understand why a language is so important. Since you have your own VPS or dedicated server, you can use C or any other programming language, create executables that do complex and targeted work and send the result to PHP, rails, python... You can use all of the languages at the same time. It really doesn't matter what main language you are using for routing your websites. PHP is cool. I have found (http://fatfree.sourceforge.net/ http://fatfree.sourceforge.net/) and I couldn't be happier. It's similar to Sinatra and has everything a small app needs. It's simple and make separation easier. But if I need that complicated data structure processing that can be done with python or perl, I'll just write down that script and run it through php and get the results. Between, this statement makes no sense for me >> This is just going to get bigger and bigger as we grow by 500% or more _every year_
- smiler 16y agoThanks for this, this framework looks real interesting!
- dpritchett 16y agoAgreed! This one snippet from the fatfree docs dispelled a good bit of my lingering hesitance to revisit PHP after a good while away: F3::route('GET /about', function() { echo 'No subliminal messages here...'; } );
- code_duck 16y agoThe problems is that many popular hosts have not deployed PHP 5.3 yet. So, if you're planning on using this framework, you need to make sure your host and anyone you distribute it to are using at least 5.3. This nullifies one of the common reasons for using PHP ("it's supported everywhere").
- bcosca 16y agothis is fast becoming a myth. a lot of hosting companies are moving up. godaddy already offers php 5.3 shared hosting.
- jarin 16y agoI used to be a PHP programmer, and now I'm a Ruby programmer. A lot of great things have been built on PHP, I just don't like coding with it. To the folks who build great things on PHP, more power to them.
- slantyyz 16y agoYou've got the right attitude. You just say you don't like it and move on. Different strokes for different folks. No point in being condescending about someone else's choice of language.
- nervechannel 16y ago"Email marketing" + "I thought you were cool" = cognitive dissonance
- smiler 16y agoI have to say, I code in .NET during the day and have been considering ruby / python for my own projects because the hosting costs are a lot less. I used to do a lot of PHP and I keep thinking I should just stick with that. Although it feels 'dirty', the only thing I consistently read about ruby & python web apps are deployment issues and exactly the best way to deploy those apps. With PHP it seems very straight forward and an easy way to avoid all those issues.
- Tichy 16y agoI don't know, PHP used to be a security nightmare (or rather, it would encourage bad security flaws - I assume it is possible to write reasonably secure PHP web apps). Has that improved much? Yes, getting a site up and running is fast. Making it secure might be a lot less simple.
- rubinelli 16y agoYou can write secure apps in PHP. What I find unforgivable about PHP is that most of the code examples you will find on the web or in books is outdated and insecure. For example, a newbie looking for how to make a DB connection is much more likely to stumble on the mysql_* functions than on PDO.
- forensic 16y agoASP.NET has always been the cleaner, nicer-to-use alternative to PHP. If you're already good at .NET i see zero advantage to saving the few dollars here and there that PHP would bring. Your time as a human is far more valuable than the extra cost of an IIS server. Ruby and Python actually offer some language advantages tho. Personally if I coded .NET in the day I would be looking at F# for webapps.
- robryan 16y agoThe trend I've noticed n recent years is that the PHP developer has to defend himself when talking about language choice, much like someone who decides to use .NET. People never see the same need when starting a project in rails, even if it isn't that great a fit. One advantage PHP has for me is that nothing is abstracted away in a way that I don't understand the underlying components because I'm writing my own framework. Sure certain aspects I'll grab some cade as necessary but in general everything I'm doing I've either written it or parts of it myself. I get all the semantic language arguments against PHP and largely agree, this has become less of a problem for me though with experience.
- Tichy 16y agoI have no doubts that complicated things can be done in PHP. Complicated things can and were being done in Assembler, too. It just is a red flag and makes me wonder about the sense of taste the developers at a PHP company have. Therefore it would take a lot to convince me that working for them is "alright". If they have bad taste, how are they supposed to write nice code? Having to learn their proprietary solution to scaling issues only is not as tempting as it sounds. Yes, I am interested in working with scaling problems. But learning a proprietary PHP hack is not going to help my CV that much.
- juice13 16y agoI work as a developer at a stock exchange. My department wrote and maintains several business apps in PHP, including a report generation framework and several realtime clinet/server apps. I find it reliable, reasonably powerful and easy to use. It's major strength is brilliant documentation on the official web site (this is a major downside to Python in my experience).
- deleted 16y ago[deleted]
- sp4rki 16y agoIn this day and age the only real reasons to use php is because you're either stuck with it and changing the code base makes no sense since you already have a product built, because you're new and don't know any better, or because you've been doing it for such a long time that you're so used to it you don't see the languages faults anymore. One of the applications I maintain is a convoluted machine made of half java half php on top of Quercus, and if freaking drives me crazy. I think the only thing I hate more than that is working in ASP.
- Yaggo 16y agoAs opposed to its peers (eg. Ruby, Python), the original PHP was not a programming language but just a collection of tools for HTML preprocessing. Although the current PHP has nothing to do with the original one, and PHP 5.3 actually has pretty nice feature set with namespaces (finally!) and anonymous functions, its "non-academic" roots still show off as general ugliness. That's why I wouldn't recommend PHP to anyone as their first programming language (been there, done that, nowadays a Pythonista).
- mgkimsal 16y agoSomeone else may have mentioned something like this, but I can't find it, so I'll chime in. Transitioning to Ruby or Python or Scala or anything else will not make anything magically better. I recently converted a Rails project to Grails (actually, I'm in the middle of the conversion). I'd thought "it's Rails - we'll just go in and fix the current issues". It was a horrid nightmare of undocumented crap. It was started in 2006 - Rails 1, and had been added on to for nearly 4 years, and was still Rails 1 (1.2). No useful inline comments, no unit tests, undocumented magic method overrides for basic stuff that wasn't compatible with future Rails versions, and so on. It was horrid. But hey, it's Rails, right? Must be magically better than PHP! I went back and forth on whether to rewrite in PHP or Grails, and either would have been fine. Why? Because part of the rewrite process is to use modern techniques - with a big helping of TDD tempering the process. Oh, and version control. Yeah - 4 years of a project with 0 version control is not fun to deal with. So... I'll take PHP with a team of people using sane schedules, TDD/testing, version control, internal and external documentation, and other niceties, over Ruby for the sake of Ruby. Now, modern Ruby/Rails with all those niceties vs PHP with same niceties? Probably a more even draw, with no clear cut choice. But that doesn't seem to be brought up in these discussions. Frankly, most of the stuff people point to as awesome about Ruby (or Groovy, in my case) in isolation can be detriment - metaprogramming in general can be confusing to someone new to the code without proper documentation as to what's being done. Whether those docs are in tests, inline or external is beside the point. Typically when I come in to a new code base in any language the documentation just doesn't exist (or, better yet, it's "self-documenting"... right...). End of rant - PHP really is fine when used with proper development techniques. Most languages are. In my experience problems start (and get worse over time) when people rely exclusively on the language alone, rather than language + commonly accepted dev techniques.
- petsos 16y agoThese quotes from PHP's creator are very enlightening: http://en.wikiquote.org/wiki/Rasmus_Lerdorf http://en.wikiquote.org/wiki/Rasmus_Lerdorf
- pbiggar 16y agoMy bank supports billions of dollars of transactions per day. But they use COBOL, so I will never work there.
- lusis 16y agoSpeaking specifically of mailchimp, I interviewed with the a few years ago. They are a seriously cool company. If you ever get a chance to talk to Chad, ask him to tell you the story of DDoSing Mechanical Turk. Ignore the language they use, mailchimp is an amazing analytics company.
- poink 16y agoPHP is fast and just about everybody "knows" it (which is a curse as much as a gift). But as someone who made a living writing PHP and made the jump to another language: a) I find it more enjoyable to program in other languages. b) I can generally get things done more quickly in other languages (feel free to ignore this point if you're the opposite :P). c) Aside from speed, ubiquity, and the docs on php.net (which are awesome), I don't really get anything out of using PHP. d) People will pay me more to program in other languages. So yeah, I suppose my first reaction on reading "PHP" in any job description is "Eww". It's not really because I think PHP is wholly unsuited for programming, though. It's just not optimal for me, personally.
- wildmXranat 16y agoWell, I experienced a reverse ewww when I was interviewing at Amazon for an Imdb job. As soon as I mentioned that my previous employer used PHP, I had a very short and quite frank answer: Oh, what for? PHP is such a bad language. So bad, that nobody should use it. I was kind of floored since I didn't exude a fan-boy mentality, I was simply answering the questions. That was more of an inner chuckle, but I wasn't surprised by his answer at the end of the day. By the time the interviews ended, I realized that PHP might be the last thing these guys will look at. Coincidentally, I took another offer where the core is PHP + Symfony + Doctrine. I was very impressed at how well behaved, structured and developer friendly a good source base can be, no matter the language.
- nopal 16y agoCan an admin update the link to: http://www.mailchimp.com/blog/ewww-you-use-php/ http://www.mailchimp.com/blog/ewww-you-use-php/ The submitted link requires clicking a "More" link in order to read the full entry. (And it will be out of date once they post another entry on the blog.)
- mustpax 16y agoCan someone fix the link? It's pointing to the front page for the blog, the blog post is here: http://www.mailchimp.com/blog/ewww-you-use-php/ http://www.mailchimp.com/blog/ewww-you-use-php/
- Keyframe 16y agoI picked up PHP because it was like C (which I use since I was born) with training wheels and some quirks. It gets the job done, sometimes spectacularly, sometimes not so very much - depending on who did the work. It's a workhorse, and has been demonstrated as such millions of times so far. Performance depends a lot on deployment strategy, but it can be fast. I really see no point in bashing PHP. It's a tool, it has tons of documentation, libraries and available helpful people. Sure, I'd like to have some tweaks here and there, but with what tool wouldn't you? There is a saying around here, roughly translated: Rusty cock minds every(single) pube.
- trustfundbaby 16y agoI think this is the money quote in the article "Once you get to the scale of computing we’re at, the language you use is much less important than the platform you build on it."
- alexyoung 16y agoI don't understand the "PHP is fast" comments. Whenever I've had major scaling problems with PHP or anything else it's been due to IO rather than a fundamental issue with whatever language I was using. The things I did to fix the performance problems are generally language agnostic. Improved database architecture, search indexer configuration, clustering, memcache, etc.
- wvenable 16y agoYeah, PHP is slow. It's just that the speed of your language doesn't really matter. What is, in my opinion, an advantage with PHP (but not exclusive to it) is the whole share-nothing design philosophy and mod_php.
- yoyar 16y agoAs someone who's written tons of Java/J2EE etc... and who's been writing PHP for several years, I don't get all the PHP bashing. I've seen tons of garbage code in Java, and in PHP. And I've seen amazing things done with both. It's a poor carpenter that blames his tools. And yes, for many tasks I opt for PHP, because it is fast for both implementation and performance. It's fun and it works really well, as long as you know what you are doing. How's that different from Java, Python, Ruby etc...? One more thing, if you want to judge a language based on how much trouble you can into, what about C? Or what about the threading and memory leak issues you can run into in Java? I mean, all of these languages have massive pitfalls and none of them can effectively stop a bad programmer from doing bad things.
- dunk010 16y agoThe web stack at Last.fm is PHP, for better or worse. It's certainly not a pretty language. Or consistent. Or advanced. I've got a theory on why so many large websites use PHP though - from Facebook, through Flickr, Yahoo and Last.fm. I think it's a combination of PHP being the best option available at the time many of these large websites were set up, and it being a very simple language. Yes, I actually think that can be an advantage. In PHP you don't spend any time beautifying things. You don't bother writing "clever" code because you can't, really. Writing in PHP pushes you towards making "the simplest thing that could possibly work" - which is so in sync with the most fruitful startup mentality. It doesn't mean I like it though. It's still as ugly as sin. After all these years programming it I still get thrown by ($needle, $haystack) ($haystack, $needle) and have to look up which variant this particular function uses. I'd much rather be doing it all in Ruby. Or Lisp.
- Joeri 16y agoThe string functions are (haystack, needle), the array functions are (needle, haystack). And, no, knowing that doesn't actually help me because I always seem to mix them up anyway during coding.
- code_duck 16y agoWe always hear about Facebook using PHP as a justification for it. Unfortunately for this line of thought, Facebook wanted to move away from PHP 3-4 years back, specifically to Python I believe, and realized it would be too much work to rewrite their entire front end. So, they're trapped in PHP, not using PHP because they think it's the best choice. This was mentioned in the article announcing HipHop.
- klochner 16y agoPHP devs are the silent majority.
- kloncks 16y agoI grew up coding in PHP and still love it to this day, so I agree with the basic premises of this article. The one thing that bothered me was towards the end. In trying to justify PHP's coolness (which I am not arguing against), people continuously bring up Facebook as an example, even though they've repeatedly stated that they wanted to move away from PHP to Python years ago but realized they couldn't after having hundreds of thousands of lines in PHP. PHP's cool. I love PHP. But, let's stop using Facebook as an example of a company "embracing PHP".
- JimmyRuska 16y agoPHP is a pretty decent lazy language, it just could give rise to bad habits. It also has a few odd irregularities in the naming of functions/argument order. It's just a massive arsenal of functions for everything. For example if people want to manipulate a string or array, newbies will often not pay any attention to how often it gets iterated through redundantly. They just use a bunch of functions that do what they want magically.
- coolgeek 16y agomoozeek - It's 2010 - link the post, not the blog
- roryokane 16y agoFor posterity, the link to the post: http://www.mailchimp.com/blog/ewww-you-use-php/ http://www.mailchimp.com/blog/ewww-you-use-php/ Edit: never mind, http://news.ycombinator.com/item?id=1819021 http://news.ycombinator.com/item?id=1819021 already posted it.
- pkulak 16y agoOh well, you built your own framework. That changes everything!
- Revisor 16y agoIn this context I'd like to quote Peter Norvig talking directly here on HN just a few days ago (in this case about Lisp vs Python): In terms of programming-in-the-large, at Google and elsewhere, I think that language choice is not as important as all the other choices: if you have the right overall architecture, the right team of programmers, the right development process that allows for rapid development with continuous improvement, then many languages will work for you; if you don't have those things you're in trouble regardless of your language choice. http://news.ycombinator.com/item?id=1803815 http://news.ycombinator.com/item?id=1803815
- shawnzizzo 16y agoDoes your customer care which programming language you use? The true test is if the application that was developed meets the requirements of the customer/consumer. I don't develop for other developers; I develop for customers that want the app to work.
- mcmc 16y agoI have been contracting for a company that has an in-house version of this tool. We are able to push about 10 million emails a day, including processing bounces, click, unsubs, etc, with a fairly straightforward set of python scripts. Its not about the custom logic, its about choosing the right basic building blocks. Based on my experience, I doubt they need their "highly sophisticated" PHP to do this -- plain old normal PHP would probably be fine so long as they choose the right out-of-the-box software to pair it with. (nginx, postfix, certain non-sql databases, and the right mysql setup)
- hdeshev 16y agoEveryone has to make his/her choice of technology and MailChimp has chosen PHP. That's perfectly okay. I know PHP, and I've used it to put food on my table. Luckily that is no more. I'd consider doing PHP again only if my wife and kid were starving. My advice to people stuck with PHP codebases - start changing the site backend first. Write everything not related to spewing HTML in a real programming language, and slowly limit PHP use as a simple template-processing tool that generates your app's HTML. Which is probably the only thing PHP is good for.
- bombarolo 16y ago> thirty million emails sent by tens of thousands of users every day Damn! Are these all spammers?