As a web language PHP is without a doubt is the most popular server language that is in the use. As PHP.net statistics shows by April, 2007 there have been 20,016,421 domains using PHP for their web sites. So you can get a brief idea how popular the language has become.
History
PHP was founded in 1995 by Rasmus Lerdorf, because he needed to build a tool that would track the access to his web page. He used C to create his tools and then he released his tools to open source community under the name PHP/FI (PHP Form Interpreter).
In the first release it had many syntax similarities with Perl and in 1997 PHP 2 was released with some new features. In 1998 PHP 3 was released with many flexible features in it. And even in that stage it’s said to have occupied 10% of web servers.
PHP 4 came in year 2000 and it brought a new look to PHP language. A new object oriented look which I think resulted in initiating many new web trends such as CMS and Frameworks. It also had many new features such as new session features which helped coding with PHP. In 2004, PHP 5 was released with enhanced OOP abilities which gave PHP the strength to compete with any other web language. Unfortunately it seems that most of the web products already had a good based in PHP 4 when PHP 5 came and even now most of the products and web services are using PHP 4 as standard without using the enhanced features in PHP 5.
Some of the new OOP features in PHP 5 are listed here.
- Abstract classes
- Final Keyword
- Constant Keyword
- try, catch…throw syntax in error handling
- HTTP_*_VARS are depricated
So if you are a Java or C++ programmer no doubt you will see this is lot familiar. And with that it goes without saying that PHP is a lot tougher language than it sounds.
Evolving world of PHP
I am really glad about the moment I chose to use PHP as my primary web language when I think back. It’s not only because of advanced features of PHP 4 or 5. It’s because of the rapidly evolving community around PHP. Apache the most popular server, and PHP goes hand in hand giving all the functionality a programmer would need in web world without any waste of money. And there’re more than enough tools for a PHP programmer to use, from basic PHP modules to advanced CMS or frameworks. I’ve used ASP.net also for some time, but I can safely say I didn’t get that homely feeling around ASP.net as I had in PHP.
Lately I have started to work with PHP frameworks, mainly cakePHP and CodeIgniter. These frameworks seem to have taken after the steps of Ruby on Rails and still have the space to develop. But it’s very enjoyable to work with them, especially with cakePHP as I have been using it now for some time.
As an example, to access a database and get all data in a table with cakePHP you only need this sentence.
$this->Module->findAll() ;
So you can understand how cool it is to work with cake.
I’m hoping to post my experiences with cakePHP in another post and some tips I found when working with cakePHP.