6 ms·
Rasmus Lerdorf created the most popular language for building web apps. Websites that changed the world were built with this language, and most newcomers seem t
by nir 17y ago
Rasmus Lerdorf created the most popular language for building web apps. Websites that changed the world were built with this language, and most newcomers seem to choose it as well. It managed to get a substantial share of a market that companies like Microsoft or Sun put huge resources into.
On top of all that, he actually remains a pretty cool and down to earth guy, as far as I can tell from reading his online stuff and hearing him speak a few times, which makes the snarky comments here seem even more juvenile.
- Jach 17y agoI like it when language designers are "cool". My favorite language is Python, but I like Larry Wall's quirky personality better than Guido's, and Rasmus' is great. ;)
- jrockway 17y agoBut it's not intrinsically good; every one of PHP's advantages is offered by other languages, without all the downsides. PHP's poor design and implementation has probably cost the world millions of lost man-hours; loss that could have been avoided by choosing a better-designed solution. It's certainly an accomplishment to create popular software, but this popular software is not necessarily something that should be used. The popularity is a function of choices made by uneducated users. (IE 6 is very popular, after all, but it's definitely not the best web browser around.)
- netcan 17y agoI think you could make the somewhat tautological case that IE 6 is not bad enough to make many people use something else or that php is good enough to make many people choose it. Defining good is always tricky, but being chosen by many people when other good choices are available is not a bad test for certain definitions of good. Choices may not always be %100 rational. They are usually not random.
- nostrademons 17y agoBut IE6 is bad enough to make people use something else, and PHP is not good enough to make many people choose it. Who purposely downloads and installs IE6 these days when you have Chrome/Firefox/IE8 available? And who writes a new webapp in PHP? Most people seem to miss the role that time plays in language choice. PHP's very far from the best choice for webapps now, but it was the best choice when it was invented in 1995, and even for a while afterwards (such as when FaceBook was created in 2004).
- netcan 17y agoMany people write new webapps in php. Nobody purposely downloads IE6. That isn't the point though. If they buy a computer (maybe this isn't true anymore) and go to Google using it they don't go "something's wrong." They just keep using it.
- mcantelon 17y ago>PHP's poor design and implementation has probably cost the world millions of lost man-hours; loss that could have been avoided by choosing a better-designed solution. Could you give some examples of this? I'm not a huge fan of PHP, but it generally works, as folks like FaceBook have proven.
- jrockway 17y agoCould you give some examples of this? This has been described in detail thousands of times. Google it.
- shmichael 17y agoIt greatly depends on what you compare PHP to, but to highlight a handful of disadvantages, * PHP is considered extremely weak performance-wise * There is poor to no support of multithreading * There is no eventing system * As a web framework, it sins in mixing code & design (opposed to e.g. Django-Python or Ruby on Rails) (If the term "framework" seems unfit, think of "web-targeted toolkits")
- dangrover 17y agoPHP is not a framework.
- illumen 17y agoThis essay from Rasmus is interesting: http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC... In a way php is a framework.
- Ixiaus 17y agoWhile one could argue for PHP being a "language" upon which frameworks are built, it really is just a framework. A low level framework that is. Frameworks built on top of it are just higher-level more abstract frameworks. I come from 4+ years of using it professionally and most of the higher level frameworks I'm talking about (Kohana, Zend, CodeIgniter, etc...) really only exist to overcome a lot of PHP's more abstract weaknesses (even though they can't really do much about the interpreter implementation). I can easily say that something written in Python, Scheme, or whatever-you-choose will run a lot better, take less time to build, and be easier to manage down the road. The primary problem in this industry is that the majority of web application programmers grew upon PHP and are running their own IP Consulting shops or startups by now and have zero experience with other languages, therefore making them much less interested in trying to adopt a different web development paradigm when an aspiring web developer with Python/Erlang/Scheme/Ruby skills under their belt try to build something with that tool chain in their employ. The less knowledge and/or experience with other languages you have, the more rooted in what you are comfortable with you are. Education is a good thing, that is what I love about Hacker News; the people here experiment with new languages and trying out new technologies for their projects/products - which is much more progressive than the enterprise situation.
- InclinedPlane 17y agoThat may be true today but PHP is old in web terms, when PHP began to become popular it was at a time when it had little competition that offered the same ability to build dynamic web pages with relative ease. PHP spent enough time at the top of the web dev heap to build up a substantial network effect. The comparative advantages of other technologies, large though they may by, are not yet enough to push PHP from the top spot.
- davidw 17y agoExactly. My career started back then, and there really wasn't a lot out there: * CGI (mostly done with Perl). * mod_perl (a huge ungainly mess) * ASP (no thanks, not a Microsoft guy) * Various proprietary things * Various niche players (my own mod_dtcl [later Apache Rivet] was faster and IMO, nicer than PHP, but never got more than a modest amount of traction). By the time I even started writing mod_dtcl, PHP was already pretty widely used, and we were using it in production at the company I worked for, and it was certainly better/faster than doing things in Perl CGI's. These days, I really, really, really don't like having anything to do with PHP after having dealt with too many unholy messes, but I can't deny that it got some critical things right at the right time.
- jawngee 17y agoHow do you get anything done? You seem so hung up on the tools versus creating stuff with tools. I guess it makes sense because you're the maintainer of a web framework ... for perl ... a language saddled with a checkered history of generating some pretty unmaintainable shit. And my guess is that you will respond saying "you can write maintainable code in perl!" And, of course, one would counter that you can do the same with PHP. Which boils this whole discussion down to being about the developers and the quality of developers, and less about the quality of the languages. So why are there so many crappy PHP developers? Because anyone can make it do something approximating what they are envisioning it doing, no matter the skill level. That seems pretty powerful to me. And, in the end, it's really about the results instead of how one necessarily got to those results. You can't make money if you don't deliver a product. And if history is any indication, only a tiny fraction of the masses care about quality. The dominance of Wal-mart and MySpace are proof of this. My guess about your guess is those millions of lost man-hours have been made up with the millions of hours beating competing products to market due to the rapid nature of PHP development. I mean if we are throwing around unverifiable assumptions, let's do it, let's get crazy with it. "A determined soul will do more with a rusty monkey wrench than a loafer will accomplish with all the tools in a machine shop." - Robert Hughes
- gruseom 17y agoYou undermine your argument by making it personally aggressive.
- siegler 17y agoevery one of PHP's advantages is offered by other languages Speed in a shared hosting environment. I've read about developers running multiple commercial sites from a single Dreamhost account e.g. http://www.pseudocoder.com/archives/2009/01/04/how-much-money-i-made-from-side-projects-in-2008/ http://www.pseudocoder.com/archives/2009/01/04/how-much-mone... . That's not realistic with Java, RoR, or Perl.
- nimrody 17y agoNote that Dreamhost recently moved from using mod_php to running PHP as a FastCGI server (per website/account). So I assume PHP no longer has the performance advantage of integrating closely with Apache. In fact, since Dreamhost now offers Passenger (AKA mod_rails) as a solution for running Rails and Django) PHP might be at a disadvantage. Especially when paired with a large framework (zend,codeigniter,cake, etc.)
- mixmax 17y agoI don't think you understand PHP's greatest strength. It's all about the right tool for the right job for the right man. PHP was invented so that designers could add a <p>Hello <b>Martin</b></p> and think it was cool that their homepage showed different names based on who you were. For most people basic functionality and the ability to connect to a database is more than enough. You can probably write up more than 90% of all webpages without using closuers, lambdas, recursive functions, object oriented programming and what have you. And the people who write these webpages don't care about programming at all, they just want the job done. These quotes from Rasmus shows where he's coming from. You can of course argue that people shouldn't launch webpages if they don't know what they're doing, the terrible safety concerns of letting idiots code stuff for the web, etc. but it would be like scoffing at people who don't drive an extra souped up Ferrari Enzo - very arrogant. Some pople just want to get from A to B. These are the people who use PHP. And incidentally they are also the people down in the trenches actually building all the little sites that make the world go round.
- bad_user 17y ago> It's all about the right tool for the right job for the right man. Oh, come on. Give me an instance where PHP is the right tool. This argument is so overused that I don't even know what it means anymore. And no, shared hosting doesn't count. My personal hosting plan costs something like $10 a month and I can choose between PHP, Python, Perl and Ruby (with Ruby it is more difficult, since I have to ask the sysadmin to add a couple of Mongrel instances for me). But mod_perl and mod_wsgi are there by default. > <p>Hello <b>Martin</b></p> Dude, that doesn't have any PHP code in it. To make this dynamic, you still have to have some way of authenticating and storing info about users. And you'll also want some way to edit those users. Do you know how easy it is to create a simple CMS in Django, with authentication, and a functional admin? ... it takes only a couple of hours to a beginner that never worked with Python or Django before (yes, I saw one in action). When PHP appeared, it made sense since Perl was the only game in town, and it was a bitch. But things have evolved a lot since then (even for Perl). For me, PHP doesn't make any sense.
- Jach 17y ago
- philjackson 17y agoI wonder how many IE6 users actually choose their browser?