As many of you know, I do all of my web programming using the PHP programming language. There are quite a few other web programming languages out there, though, including Java, .Net, Cold Fusion, Perl, Ruby and others. I am partial to PHP, though, and there are reasons why I think this language has a leg up on the other main contenders.
PHP originally stood for Personal Home Page. It was originally created by Rasmus Lerdorf in order to track users of his own site. Rasmus downplays the importance of his role in the language, though, and with good reason. Some other developers took an interest in what Rasmus created. they got together and wrote an API for it and turned it into PHP 3. The community took the original programming and expanded it heavily, ultimately using the language in settings for which it was never intended. Eventually, a new script parser was written (the Zend Engine) and PHP4 was released. PHP changed to PHP Hypertext Preprocessor. PHP5 marks an even greater advancement in the language. The main benefits to PHP5 lie in the realm of object oriented programming.
What are the main advantages of PHP as it sits today?
- Very Fast. PHP scripts runs atop a parser which integrates right into the operating system. It integrates well with other software (especially Unix) and when run as an Apache module, is already loaded for use. Because PHP has a small footprint and works so well with the OS, it is incredibly fast and does not hog server resources.
- Very Stable. PHP is a community driven project and, thus, bugs in the system do not last for long. For this reason, it is very stable.
- Simplicity. PHP is simply a very easy language to learn to program with. It is structurally similar to the C programming language, but the syntax is pretty easy to use. Most of the built-in function names are named using English words so that you can easily remember them.
- Extendability. PHP has entire libraries of extensions which can be compiled into it in order to extend the capabilities for you on your server. These specialized libraries make it easy for programmers to do complex tasks using shortcut functions. Other programmers have done the work to make your development job easier. PECL is a library of PHP extensions, and PEAR is a library of programming code to achieve a variety of purposes. Many of the built-in extensions already help in many ways, including connecting to multiple types of databases, doing dynamic image creation, or handling XML.
- Cross-Platform. PHP will run on almost any operating system. As long as your PHP scripts use the standard PHP functionality, it can run on any server using almost any operating system, without the need for you changing your code.
PHP is an open source language. Now, whether this is good or bad has, for a long time, been a subject of debate among programmers. Many times you will find large companies looking for solutions which have big company names behind them. Cold Fusion is sold by Macromedia and, even though it costs some real coin to get it set up, many companies like being able to go to a company like Macromedia with their problems. It is the same situation with Microsoft. In most cases, any job performed among these high-priced platforms could be done just as well with PHP. And PHP is free. In fact, the entire LAMP model (Linux, Apache, MySQL and PHP) is a totally free and very powerful server platform. Programming, though, is a lot like religion in that people will choose their group and they will war over it. Some programmers just swear by expensive solutions. They can go use the Oracle database when MySQL will do if they want, but they are only spending thousands more dollars for no reason whatsoever.
Today, PHP is the most widely used programming language for the web. It has the largest following and user base of any web programming language to my knowledge. It is supported by a large and dedicated community. For this reason, you are never alone when venturing into PHP programming.