PHP is a scripting language intended for development of dynamic web content and is performed on the server side. Because of its syntax it inherited from programming language C and due to its simplicity, PHP has gained great popularity. As time passed, the language expanded and obtained the opportunity for object-oriented programming. It has the possibility of procedural programming, but it also allows the use of classes and other concepts of object-oriented programming.
The first tool named PHP / FI was written in 1995 by Rasmus Lerdorf for his own needs, and it was a set of Personal Home Page Tools, hence the abbreviation PHP. This version had only a few common things with today's PHP. Shortly after the official release of PHP / FI 2.0 in 1997, it was replaced by PHP 3.0. This version of PHP is a version that resembles today's versions of PHP. It was created by Israeli developers Zeev Suraski and Andi Gutmans as a complete rework of the PHP / FI project, and in collaboration with Lerdorf, they published PHP 3.0 as the official successor of the PHP / FI language. This version had greater consistency and the possibility of object-oriented programming, and the main feature was its expandability.
PHP 3.0 was officially released in June 1998 after nine months of use in the trial phase, the name was changed to PHP without the addition of "FI", and the meaning of the abbreviations has changed and represents "PHP: Hypertext Preprocessor."
In the winter of 1998, Zeev and Gutmans started rewriting PHP from scratch, trying to fix the core to work better with larger applications and to improve modularity. They named the new core the Zend engine, by parts of names Zeev and Andi, only to later establish Zend Technologies in Ramat Gan, Israel, overseeing PHP's upgrading. The new core was successfully completed and appeared in public in mid-1999, and the new version of PHP 4.0, equipped with the new core, was officially released in May 2000. In addition to better performance, the new version included caching of the standard output, sessions, better support for various web servers, more secure transfer of user data and several new control structures.
Version 5.0 came out in July 2004, after a long development and several trial versions. It uses the Zend engine 2.0 core with a new object model and many new features. This version has also brought a lot of changes in object-oriented programming.
PHP can be used to program console applications and graphical interfaces (the PHP-GTK library), and its basic and main use lies in programming dynamic pages on the Internet.
Today, PHP is used by several hundred thousands of developers and several million of sites including some of the most visited sites in the world, such as Facebook, Wikipedia, Yahoo, YouTube, and Flickr.
A program written in PHP does not require translation (compilation), but is interpreted at every execution. PHP interpreter can work by the PHP CGI principle, that is, the interpreter will exist as an external application, which is invited to execute the given script every time it is requested by a user, and can also be installed as a web service module. The second variant is in greatest use today as it provides a significantly higher execution speed - the interpreter is thus always loaded into the memory, and no external program needs to be invited.
The usual scenario by which PHP scripts are executed is the following:
a client (an Internet user using an Internet browser) requests a PHP page from the server, the server forward the request to web service (web server program on server), web server recognizes that a PHP file is requested, does not send its content to the client, but executes it as a program using the PHP module, output program text (standard output) is sent to the client, as a result of the request the client recognizes the type of results (HTML code, image, PDF content, archive, etc.), the result is displayed to the client in the appropriate way.
In recent years, PHP programming language has been raised to a higher level. There are packages (php framework) serving as tools for faster and safer development of Internet applications. The purpose of these packages is to join ready-made tools from one technology into a practical framework so that the resulting package is used as one tool. Thus, a developer would have at its disposal the basic functionalities of the technology that used, and would devote himself only to the logic of the application he builds, the problems of organizing files, object classification and security.
These are just some of the more famous and popular PHP packages: Laravel, Phalcon, Symfony2, Codelgniter, Yii, Aura, Zend Framework 1 and 2, Cake PHP, Kohana and many others.