If you have been dabbling with Web technologies for any length of time, you have heard about the Web page scripting language called PHP, or PHP: Hypertext Preprocessor. An open source development, PHP is incredibly popular and forms part of what is known as the LAMP stack, where LAMP is an acronym representing Linux, Apache, MySQL and PHP.
The current version widely in use is PHP 5; I would hesitate to deploy applications on a system running anything earlier than PHP 4. Its remarkable popularity aside, PHP has some clear advantages when it comes to Web development.
Availability of code samples
Not sure how to code something? For all but the most arcane of tasks, you should be able to find a large number of freely available code samples on the Internet. And even if you are unable to locate something to help you along, PHP's similarity with the C programming language means that you can quickly do a port from this venerable language as necessary.
Diversity of functions
In the spirit of open source development, many developers have either contributed or integrated their code libraries to the PHP project. This makes it possible to quickly perform a mind-boggling range of actions such as retrieving the content from another Web site, generating barcodes, drawing graphs on-the-fly, or even creating PDFs documents -- with just a few lines of code.
The availability of good database abstraction libraries also means that if you opt to build your project around them, you will theoretically be able to do a swap between database engines, say, from MySQL to PostgreSQL, by just modifying a single parameter.
Did I mention PHP's popularity earlier? Well, let me just reiterate. This popularity translates directly into a large number of excellent Web applications built using PHP, ranging from Wordpress, the world's most popular blogging engine, to phpBB, a comprehensive forum built on top of PHP. Because the source code to them is freely available, it is relatively easy to integrate these projects together with your own Web site or intranet.
Of course, it would be foolish to imagine that everything about PHP is a bed of roses. I have worked on multiple PHP-based development projects in the past, with the largest consisting of more than 25,000 lines of code that I wrote for an SMB project.
I will be sharing about some potential pitfalls of using PHP based on my experiences, so stay tuned.