Why PHP Won
I attended a very interesting talk last night given by Rasmus Lerdorf, the originator/creator/founder/daddy of the PHP programming language. Rasmus spoke for ~2.5 hours at LaunchPad NOLA in New Orleans and there were about 35 people there to hear what he had to say. While there were some very technical (or nerdy?) questions being asked, it turns out Rasmus is more of what I’d call “practical”. He’s obviously smart enough to write a programming language but he tends to look down on programming for programming’s sake, and his focus seems to be on what can be done with a programming language. That was something I really liked to hear – and something I can relate to.
Sure, it’s interesting (to a point) to discuss and understand the internal mechanics of how PHP works and why it does certain things…but what I really want to know is how I can use PHP to create a solution to a problem. After all, that’s what people pay me to do – they don’t care if I understand the history, philosophy, or structure of the PHP language. They just want me to make it do useful things.
That being said, it was kind of interesting to hear Rasmus’ story of how PHP eventually came to be, how it evolved, and why it “won”. What I got from his talk (on why PHP won) is that it had a lot to do with wide adoption from ISPs and ease of integration with the web.
The other programming languages out there just weren’t “web-oriented” from the beginning (like PHP). Perl, a general-purpose programming language, did (and does) run much of the web but PHP was just easier and more “friendly” for someone who wanted to create a dynamic web site. Python and Ruby weren’t focused toward “web programming” at all, even though they were around back then. Rasmus explained that the guys with CS degrees and the academics just didn’t think the web was interesting enough back then (in the mid ’90′s). PHP however just worked in web pages, so it was a natural choice for people who just cared about that realm of programming. So it took off.
Some people would argue that that’s a “bad” thing. In a way, it probably is because a lot of non-programmers have written a lot of code that’s just ugly/bad/hacky/dangerous. But, really, why is it so bad in the big scheme of things? The arguments against an accessible, easy-to-pick-up programming language (and the bad coding that results) makes me imagine an elitist club of programming majors who don’t want anyone else to join. It would be ridiculous to think that the musicians of the world would protest the sale of cheap guitars and amateurs posting their renditions of songs on YouTube. But some programmers are doing the equivalent thing. I mean, who cares? It’s a good thing in my opinion that people can easily start to program, even if they’re not perfect at doing so.
PHP won because it’s accessible to the masses. It also won because it worked (well) with two other crucial pieces of web technology: Apache and MySQL. In a sort of symbiotic relationship these three things (Apache, MySQL, and PHP) helped each other. The aforementioned ISPs, of course, had to adopt these things (I guess cPanel helped) but without a webserver for the people and a solid database that everyone could use, a scripting language would have nowhere to go. All the right things came together at the right time for PHP to “take off” I suppose.
I personally have “tried” other languages and just keep going back to PHP because it feels comfortable. I’ve also built up a lot of code over the years that I re-use and re-purpose. Sure, it seems sexy or somehow cool to be able to say I wrote something in Ruby…but why? I can get the job done in PHP just as well and it happens to work quite nicely on everyone’s web host.
I’m glad I got to hear what Rasmus had to say last night, and I’m glad PHP won. It’s provided me a very interesting and enjoyable way to make a living over the years, after all!