PHP is a server side scripting language designed mainly for web programming and also for general purpose programming language. This language was developed by Rasmus Lerdorf in 1994, the PHP reference implementation is now produced by the PHP development team. PHP once stood for Personal home page but now it stands for recursive acronym PHP: Hypertext Preprocessor.
PHP code can be embedded into HTML code or it can be used in relation with with various web template systems, web content management systems and also web frameworks. The PHP interpreter parses processes the PHP code. This PHP interpreter is implemented as a module in the web server or as a common Gateway Interface (CGI). PHP code may also be executed with a command line interface (CLI) and can be used to implement standalone Graphical apps.
The standard PHP interpreter, powered by Zend Engine, is Free software released under the PHP License. PHP can be deployed on most web servers, on almost every OS and platform free of cost. PHP is faster and more widely supported than any other programming language like ASP.NET.
This language has evolved without a written formal specification or standard until 2014, leaving the canonical PHP interpreter as a de facto standard. Since 2014, work is going on to create a formal PHP specification.
The work on PHP started in 1995 when Rasmus wrote several CGI programs in C to maintain his personal homepage. He later extended them to work with web forms and to communicate with databases and named this implementation as “personal home page/ Forms interpreter” or PHP/FI.
PHP/FI could help build simple and dynamic web apps. In order to accelerate bug reporting and to improve the code, Rasmus announced the release of PHP/FI as “Personal Home page Tools (PHP Tools) version 1.0”, on the Usenet discussion group on June 8th 1995. This particular release had the basic functionality that PHP has as of 2013. These include Perl-like variables, form handling and the ability to embed HTML.
Lerdorf did not expect that PHP would become a programming language. But it grew organically and so he said in retrospect: “I do not know how to stop it, there was never any intent to write any programming language. I have absolutely no idea how to write a programming language, I just kept adding the next logical step on the way”. Soon a development team was formed and after thorough testing it was officially released in November 1997. Since PHP lacked an original overall design has led to inconsistent naming of functions and inconsistent ordering of parameters.
The original and most widely used PHP implementation is powered by Zend Engine and is known as PHP. To be more precise, it is unofficially referred to as “Zend PHP”. The Zend Engine compiles PHP source code on the fly into an internal format which it can execute. Thus it works as an interpreter.
Due to the complex and nuanced semantics of PHP, it is difficult for competing implementations to offer competing compatibility.
PHP’s single-request-per-script-execution model and the fact that Zend Engine is an interpreter leads to inefficiency; as a result various products have been developed to help improve PHP performance. In order to decrease the execution time and not have to compile the PHP source code every time the page is accessed, PHP scripts can be deployed in PHP engine’s internal format by using an op code cache which works by caching the compiled form of a PHP script (op codes) in shared memory to prevent the overhead of parsing and compiling the code every time the script runs. An op code cache, Zend Op cache, is built into the PHP since version 5.5.