Krishna Kumar is a software development manager from New Hampshire. He writes on topics related to software development, programming, project management, and business management. Krishna is a DZone MVB and is not an employee of DZone and has posted 41 posts at DZone. You can read more from them at their website. View Full User Profile

The Allure of PHP

  • submit to reddit

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.



Published at DZone with permission of Krishna Kumar, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)



Michal Xorty replied on Thu, 2011/08/11 - 3:06am

PHP caremeter still set on zero, sorry.

Gnu Skool replied on Thu, 2011/08/11 - 3:27am

As a Java student, I'll confess that I like the language very uch, especially with what is possible using it in conjucntion with arduino.

But, to my surprise, I was shocked to see simpler code for microcontroller code written in PHP whcich convinced me to not write off PHP just yet.

Mike Dzone replied on Thu, 2011/08/11 - 7:46am

If you are looking at comparisons of PHP to other web application technologies, I have to agree that PHP is easy to use, quick for development, and very widely supported.  I am a career Java developer but I have to tell you creating a web application in Java is a nightmare nowadays.  I started a new project from scratch and it took me over a week just to get all the dependencies in place and the different frameworks configured and working together...during this time no work was done on the actual application mind you. 

Michal Xorty replied on Thu, 2011/08/11 - 8:00am

@Mike Dzone No offense, but you are professional Java developer and it took you a OVER A WEEK to setup NEW project?

Ryan Developer replied on Thu, 2011/08/11 - 11:59am

Please post Java content on JavaLobby.

Cosmin Mutu replied on Fri, 2011/08/12 - 1:51am in response to: Mike Dzone

Well, if it was your first JAVA WEB project, it makes sense ... otherwise, you`re not the professional you state to be :)

John Waterwood replied on Fri, 2011/08/12 - 11:44am in response to: Mike Dzone

Mike, just download Glassfish or Resin. Very lightweight and both implement a really powerful yet easy to use full stack framework: Java EE Web Profile. This contains JSF 2.0 out of the box, which really is one of the best web frameworks. You also get CDI and JPa. Nothing to download or configure, it's all there :-)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.