What is PHP?

PHP, which is recursive acronyms for “PHP Hypertext Preprocessor”, is a server-side, HTML embedded scripting language used to create dynamic Web pages. Much of its syntax is borrowed from C, Java and Perl with some unique features thrown in. The goal of the language is to allow Web developers to write dynamically generated pages quickly.

In an HTML page, PHP code is enclosed within special PHP tags. When a visitor opens the page, the server processes the PHP code and then sends the output (not the PHP code itself) to the visitor’s browser. It means that, unlike JavaScript, you don’t have to worry that someone can steal your PHPscript.

PHP offers excellent connectivity to many databases including MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, and Generic ODBC. The popular PHP-MySQL combination (both are open-source products) is available on almost every UNIX host. Being web-oriented, PHP also contains all the functions to do things on the Internet – connecting to remote servers, checking email via POP3 or IMAP, url encoding, setting cookies, redirecting, etc.

History of PHP

PHP stands for PHP: Hypertext Preprocessor, with that PHP standing for Personal HomePage/Form Interpreter . This type of acronym is known as a retronym. Originally, in 1994, the language was designed as a small set of binaries used to collect some basic site traffic data. In 1997 the parser was rewritten by two Israelis and the name was changed to the current acronym — it being determined that hypertext preprocessor was a decidedly more acceptable name in the business world.

PHP is an open-source language, used primarily for dynamic web content and server-side applications. It is often pointed to as the main competitor with:

• Microsoft’s C# – Visual Basic.NET – ASP family,
• Sun’s Java – JSP
• Macromedia’s ColdFusion
• CGI – Perl

PHP has many open-source libraries included with the core build, and many more are readily available. Extensions exist to help PHP interface with a number of systems, including IRC, a number of compression formats, and Windows API. Other extensions exist to let PHP generate file formats on-the-fly, such as a popular extension which allows PHP to create Macromedia Flash movies.

Since version 3, PHP has integrated object-oriented features. Version 5 built substantially on this limited functionality, and PHP now has robust object-oriented capabilities, including interfaces, exceptions, destructions, and abstracts.

PHP reached wide-spread popularity with version 4, released in 2000. In 2004 PHP 5 was debuted, and it is now considered one of the top languages used for server-side scripting.

PHP/FI

PHP succeeds an older product, named PHP/FI. PHP/FI was created by Rasmus Lerdorf in 1995, initially as a simple set of Perl scripts for tracking accesses to his online resume.

He named this set of scripts ‘Personal Home Page Tools’. As more functionality was required, Rasmus wrote a much larger C implementation, which was able to communicate with databases, and enabled users to develop simple dynamic Web applications. Rasmus chose to » release the source code for PHP/FI for everybody to see, so that anybody can use it, as well as fix bugs in it and improve the code.

PHP/FI, which stood for Personal Home Page / Forms Interpreter, included some of the basic functionality of PHP as we know it today. It had Perl-like variables, automatic interpretation of form variables and HTML embedded syntax. The syntax itself was similar to that of Perl, albeit much more limited, simple, and somewhat inconsistent.

By 1997, PHP/FI 2.0, the second write-up of the C implementation, had a cult of several thousand users around the world (estimated), with approximately 50,000 domains reporting as having it installed, accounting for about 1% of the domains on the Internet. While there were several people contributing bits of code to this project, it was still at large a one-man project.

PHP/FI 2.0 was officially released only in November 1997, after spending most of its life in beta releases. It was shortly afterward succeeded by the first alphas of PHP 3.0.

PHP 3

PHP 3.0 was the first version that closely resembles PHP as we know it today. It was created by Andi Gutmans and Zeev Suraski in 1997 as a complete rewrite, after they found PHP/FI 2.0 severely underpowered for developing an eCommerce application they were working on for a University project.

In an effort to cooperate and start building upon PHP/FI’s existing user-base, Andi, Rasmus and Zeev decided to cooperate and announce PHP 3.0 as the official successor of PHP/FI 2.0, and development of PHP/FI 2.0 was mostly halted.

One of the biggest strengths of PHP 3.0 was its strong extensibility features. In addition to providing end users with a solid infrastructure for lots of different databases, protocols and APIs, PHP 3.0’s extensibility features attracted dozens of developers to join in and submit new extension modules.

Arguably, this was the key to PHP 3.0’s tremendous success. Other key features introduced in PHP 3.0 were the object-oriented syntax support and the much more powerful and consistent language syntax.

The whole new language was released under a new name, that removed the implication of limited personal use that the PHP/FI 2.0 name held. It was named plain ‘PHP’, with the meaning being a recursive acronym – PHP: Hypertext Preprocessor.

By the end of 1998, PHP grew to an install base of tens of thousands of users (estimated) and hundreds of thousands of Web sites reporting it installed. At its peak, PHP 3.0 was installed on approximately 10% of the Web servers on the Internet. PHP 3.0 was officially released in June 1998, after having spent about 9 months in public testing.

PHP 4

By the winter of 1998, shortly after PHP 3.0 was officially released, Andi Gutmans and Zeev Suraski had begun working on a rewrite of PHP’s core. The design goals were to improve the performance of complex applications and improve the modularity of PHP’s code base. Such applications were made possible by PHP 3.0’s new features and support for a wide variety of third-party databases and APIs, but PHP 3.0 was not designed to handle such complex applications efficiently.

The new engine, dubbed ‘Zend Engine’ (comprised of their first names, Zeev and Andi), met these design goals successfully, and was first introduced in mid 1999.

PHP 4.0, based on this engine, and coupled with a wide range of additional new features, was officially released in May 2000, almost two years after its predecessor, PHP 3.0. In addition to the highly improved performance of this version, PHP 4.0 included other key features such as support for many more Web servers, HTTP sessions, output buffering, more secure ways of handling user input and several new language constructs.

Today, PHP is being used by hundreds of thousands of developers (estimated), and several million sites report as having it installed, which accounts for over 20% of the domains on the Internet.

PHP’s development team includes dozens of developers, as well as dozens others working on PHP-related projects such as PEAR and the documentation project.

PHP 5

PHP 5 was released in July 2004 after long development and several pre-releases. It is mainly driven by its core, the Zend Engine 2.0 with a new object model and dozens of other new features.