The Allure of PHP

by Krishna on August 10, 2011

Hush, Cédric Beust just admitted he likes PHP. He cites the following reasons:

  • PHP is like C
  • PHP never let me down
  • PHP is robust
  • PHP’s documentation is great
  • Universal support
  • High reward

I agree with him mostly, except for the “robustness” part. Cedric, being a better programmer, might have got perfectly working code. But my guess is that all other things being equal, PHP is more brittle than other programming languages for the web. It is not a complicated language, but has its quirks.

But that is not what I want to talk about! The important thing to realize about PHP is that “universal support” thing, which means that PHP comes free with the cheapest hosting solutions available (LAMP servers). In plain English, because of that, PHP is not going away. For many small companies, you don’t need much more than PHP to create a simple website. It seems that PHP is used on 75% of all web servers. Take that, Java, C#, RoR, Python!

Also consider that there are many open source solution frameworks (WordPress, Drupal, Moodle, to name a few) on top of which you can build websites and applications. For example, if you wanted to create a website for your small business, why look anywhere other than WordPress? You can create and edit pages and there are thousands of plugins for everything from contact forms, SEO, analytics integration, e‑commerce, job postings, etc. You hardly need to write a line of code.

This is not to suggest that you should throw away your existing programming language and start coding in PHP. If you were to build an application from the ground up without using any external packages, your first programming language of choice would be the right way to go because of the expertise you have acquired in it. On the other hand, if you were trying to assemble multiple software pieces to create an useful application for somebody, there is a vast PHP ecosystem that you could leverage. Just because PHP does not seem like a very nicely designed language should not blind you to the advantages that offers.

{ 1 comment }

Bhaskar Chowdhury August 11, 2011 at 1:42 am

Python is leaps and bounds ahead of any damn programming language. PHP is to me is most ordinary and cheap(as you rightly pointed out) get quick way to website up..That's that...nothing more then is awful...I am wondering the author of original aritcle ever try to do something with Zope( a python framework to build website)... and many more available...can not recollect at this moment.the biggest mis -statement by the original author is " PHP is C"???? is it? Which way? I am not sure how much exposure he has to that language..

Ruby is much better interpreted language then php. Scala will definately going to replace Java sometime in the future..but it will take time.

Comments on this entry are closed.

Previous post:

Next post: