Friday, April 20, 2007

History of PHP

Today I want to publish a quite interesting article about the history of PHP.

PHP as we know it today had its origins in a simple product that Rasmus Lerdorf had created for his personal use and aptly named “Personal Home Page Tools”. This was just a simple set of Perl scripts that had been created to display his Resume and tracking the accesses to this page. As time moved, Lerdorf felt the need for greater functionality, and in 1994. Rasmus added code written in C to enable any user to develop simple but dynamic web applications that could communicate with databases. Rasmus released the source code of his product under the name of “Personal Home Pages/ Forms Interpreter” or PHP/FI for short. This made it possible for anyone to use the code, fix bugs in it and make improvements. Thus was born the ancestor to today’s PHP. That was in 1995.

PHP/FI had the basic functionality that today’s PHP offers and is being widely used by PHP web hosting services. It supported variables that were similar to those of Perl and had a syntax that was also similar to Perl. The program code could be embedded in HTML code and could be used to interpret form variables. The initial PHP, although similar to Perl, was much more limited and simple, and suffered quite a few deficiencies.

PHP/FI ver. 2.0 was officially released in November 1997 after extensive beta testing. This new version of the software became instantly popular and attracted thousands of users all over the globe. The popularity of the new software could be seen from the fact that an estimated 50,000 domains had used it for their development. This constituted 1% of all the domains on the Internet at the time – no mean achievement for a new development tool. PHP web hosting had started in right earnest. In just a small amount of time PHP web hosting has become one of the most popular web hosting platforms because of the simplicity and power that it offers. Developers from around the world started contributing to the development of the new tool, although the bulk of the work was still done by its creator and remained by and large a one-man show. PHP/FI 2.0 had short life, of which the greater part had been spent in beta testing. It was shortly succeeded by version 3.0.

PHP/FI ver 3.0 was the result of the efforts put in by two Israeli developers at the Technion Israel Institute of Technology - Zeev Suraski and Andi Gutmans - who rewrote the parser, and changed the name to “PHP: Hypertext Preprocessor”, a recursive acronym that described the product better, and also conformed to the trend of the times. In addition the new name removed the implied limitation of the existing name that it was a prodcut essentialy meant for personal use. Andi and Zeev found the existing version of PHP/FI 2.0 severly limited to handle ecommerce projects that typically resembled the one that they were developing for their University project. So they decided to do a complete re-write. Enlisting the support of Rasmus for the new project, they collaborated to form the new version, halting the work that was going on in the older version 2.0. The launch of the new version was annnounced in June 1998 and was officially announced as the successor to the existing version. This new version was the one that created the foundation for today’s PHP, which this version closely resembled.

The main strength of PHP 3.0 was its additional functionality and its extensibility. The software now supported a number of databases as backends, and provided a good base that supported different protocols and APIs. The enhanced extensibility was a bonanza that attracted many users to join in the development effort with new modules that were offered as an extension to the software. This was one of the chief reasons for the popularity of the new version. Version 3.0 also supported object orineted development and the syntax was now cleaner, more powerful, and more consistent.

The new version that was released by end 1998 quickly grew in popularity with thousands of developers taking to it. Hundreds of thousands of sites were now being developed using the new tool, quickly catapulting it to a respectable position among dynamic web content development tools with nearly 10% of all sites becoming PHP based. PHP web hosting was gaining in strength.

Not to be content with the success of the newly released version, Andy and Zeev soon began working on a rewrite of PHP’s core. PHP 3.0 was designed to support third party databases and APIs, but the efficiency with which it did this for complex applications prompted a desire for improvement. So Zeev and Andy set for themselves the goals of improving the performance of complex applications and provide better modularity in the code base. The new engine was code named ‘Zend Engine’ combining letters from the names of its developers. The developers also founded ‘Zend Technologies’ in Israel to manage further development of PHP.

The new version 4.0, which was officially released in May 2000, had a number of additional features in addition to improving the performance of complex applications. These included new language constructs and more secure handling of user input. The new version also included support for more web servers and HTTP sessions.

PHP is now used by thousands of programmers and is the base for millions of Internet sites. It is estimated that 40% of all Internet sites today use PHP, making PHP web hosting one of the most preferred choices. PHP 4 is still supported with current security updates, the latest version being 4.4.4.

Zeev and Andy found that the existing versions of PHP were good but did not quite function the way Object oriented modules should. This was becoming a major limitation as more and more developers were beginning to use the Object Oriented features. One of the main limitations was that arguments were being passed by value and could not be passed by reference. This handicapped the programmer in some situations and prevented the concerned method or class from being used without modification.

In July 2004, PHP 5, powered by the new Zend engine 2.0, was released. Apart from strengthening Object oriented development and obviating the existing difficulties, the new version further improved the performance and also added a number of new features. These included a better interface for accessing databases, better support for MySQL and SOAP, and improved error handling.

1 comments:

Addison said...

Hi, Added a new value add to my blog this weekend - a news widget from www.widgetmate.com. I always wanted to show latest news for my keywords in my sidebar. It was very easy with this widget. Just a small copy paste and it was done. Great indeed.