History of PHP
The language PHP was designed as a tool for solving practical problems. Its creator, Rasmus Lerdorf, wanted to know how many people read it online-resume, and wrote for the simple CGI-shell language Perl, ie it was a set of Perl-scripts that are intended exclusively for a particular purpose - the collection of statistics of visits.
For reference. CGI (Common Gateway Interface - a common gateway interface) is a standard that is used to create server applications that work over HTTP. Such applications (referred to as gateways or CGI - programs) to run the server in real time. The server sends the user's query CGI - program, which handles them and returns the result of their work on the user's screen. Thus, the visitor receives the dynamic information, which may vary as a result of the influence of various factors. Sam gateway (script CGI) can be written in different programming languages - Ci / C + +, Fortran, Perl, TCL, UNIX Shell, Visual Basic, Python, etc.
Soon it became clear that the shell has a small capacity, and had to rewrite it again, but already the language of Si. After that, the sources were available to the public to correct the mistakes and additions. Users of the server where the site of the first version of PHP, interested instrument appeared willing to use it. So PHP will soon become an independent project, and in early 1995 came the first known version of the product, known as Personal Home Page Tools (tools for your personal home page). Means of these were more than modest: code analyzer, knowing only a few special commands, and a set of utilities that are useful for the creation of guest books, counters visits, chat, etc.
By mid 1995, after a thorough processing of a second version of the product, named PHP / FI (Personal Home Page / Forms Interpreter - Personal Web Page / Forms Interpreter). It included a set of basic capabilities of today's PHP, ability to automatically handle html-form and integrated in the html-codes. The syntax of PHP / FI strongly reminiscent of the syntax of Perl, but was more simple.
In 1997 came the second version of Ci-implementation of PHP - PHP / FI 2.0. By the time using PHP for several thousand people worldwide, with approximately 50 thousand domains, representing about 1% of the domains on Internet. The number of PHP developers has increased to a few people, but despite this, PHP / FI 2.0 was still at large project of one man. Officially, PHP / FI 2.0 released only in November 1997, until this is mainly in the beta versions. Shortly after the release by the first alphas of PHP 3.0.
PHP 3.0 was the first version that closely resembles PHP, how do we know it today. It is very different from PHP / FI 2.0 and appeared again as a tool to address a particular application. Its founders, Andi Gutmans (Andi Gutmans) and Zeev Suraski (Zeev Suraski), in 1997 to rewrite the code of PHP / FI, as he showed them unsuitable for the development of e-commerce, over which they worked. In order to receive assistance in the project from the developers of PHP / FI, Gutmans Suraski and decided to unite with them and PHP3 to announce the official successor of PHP / FI. Following the development of PHP / FI was completely stopped.
One of the strengths of PHP 3.0 was the possibility of extending the kernel. It is the property of extensibility PHP 3.0 has raised awareness of the many developers who want to add your module expansion. In addition, PHP 3.0 has provided ample opportunity for interaction with databases, the various protocols and API. An important step to success was the development of a new, more powerful and complete syntax with support for the PLO. Since the advent of PHP 3.0 has changed not only the functionality and internal structures of language, but also its name. In the PHP acronym is no mention of it was personal use, PHP has been a reduction (recursive acronym) of PHP: Hypertext Preprocessor, which means «PHP: Hypertext Preprocessor».
By the end of 1998, the number of users of PHP has risen to tens of thousands. Hundreds of thousands of web-sites reported that they were working with this language. Almost 10% of the Internet server has been installed PHP 3.0.
Officially, PHP 3.0 was released in June 1998, after 9 months of public testing. And for winter Andi Gutmans and Zeev Suraski had begun reprocessing nuclear PHP. Their goals were to improve performance of complex applications, and improve the modularity of the code, the core of PHP.
The new kernel has been described as «Zend Engine» (of their first names: Zeev and Andi) and first presented in mid-1999. PHP 4.0, based on the kernel and with a wide range of additional features, was officially released in May 2000, almost two years after its predecessor, PHP 3.0. In addition to improving performance, PHP 4.0 has a few key innovations, such as support for HTTP sessions, output buffering, more secure ways of handling user input and several new language constructs.
Work is currently under way to improve the Zend Engine and introduce innovations in PHP 5.0, the first beta version of which has already been reached in the light. One of the significant changes occurred in the object model of language, its fundamental podlatali and added many new features.
Today, PHP is used by hundreds of thousands of developers. Several millions of sites written in PHP, which is more than 20% of domains Internet.
What can PHP do?
«PHP can all», - its creators say. Primarily used to create PHP scripts, working on the server side, so it, in fact, invented. PHP is able to solve the same problem as any other CGI - scripts, including data from html-forms that are dynamically generated html Pages, etc. But there are other areas can be used PHP. All three main areas of application PHP.
The first, as already mentioned - is the creation of applications (scripts) that are executed on the server side. PHP the most widely used to create this kind of scripts. In order to operate in this way, you will need PHP-parser (ie handler php - scripts) and web-server for processing script, your browser to view the results of the script, well, and, of course, any text editor to write itself php-code. PHP parser is distributed in the form of CGI - the program or the server module. How do I install it, and web-server on your computer, we will look a little bit later. In this course we will discuss, as a rule, namely the creation of server applications, as an example of using the language PHP.
The second area - the creation of scripts running on the command line. So with PHP, you can create scripts that will be executed, regardless of the web-server and browser on a specific machine. Such work will require only a parser PHP (in this case it is called a command line interpreter (cli, command line interpreter)). This method of work is suitable, for example, for scripts to be performed regularly with a variety of planning tasks for solving a simple word processing.
And the last area - the creation of GUI-applications (graphical interfaces), running on the client side. In principle, this is not the best way to use PHP, especially for beginners, but if you have thoroughly studied the PHP, then the possibility of such language can be very useful. To use PHP in this area will require a special tool - PHP-GTK, which is an extension of PHP.
So, the field of application of PHP is vast and diverse. Nevertheless, there are many other programming languages, capable of solving similar problems. Why study the PHP? What is it gives us? First, PHP is very easy to learn. Enough to look only to the basic rules of syntax and principles of its work, and you can start to write their own programs, and to take on such tasks in a different language which would require serious preparation.
Secondly, PHP is supported by almost all known platforms, nearly all operating systems and a variety of servers. This is also very important. It is unlikely that anyone would want to move, for example, work on Windows work on Linux or IIS server to Apache server just to explore yet another programming language.
In PHP combines the two most popular programming paradigms - procedural and object. In PHP4 better supported procedural programming, but it is possible to write programs in the object style. Already in the first test versions of PHP5 the majority of gaps in the implementation of object-oriented model of language that exist in PHP4, eliminated. Thus, you can choose the most usual way of working.
If we talk about the capabilities of today's PHP, then they go far beyond those that have been implemented in its first versions. Using PHP you can create images, PDF-files, flash videos, it supports a large number of advanced database features are integrated to work with text data of any format, including XML, and functions to work with the file system. PHP supports interaction with various services through appropriate protocols, such as protocol control access to Directory LDAP, a protocol with network equipment SNMP, messaging protocols IMAP, NNTP, and POP3, HTTP hypertext transfer protocol, etc.
Drawing attention to the interaction between different languages, it is worth mentioning the support of Java objects and using them as objects of PHP. For access to the remote sites can use the expansion of CORBA.
To work with textual information PHP inherited (with minor modifications) mechanisms for working with regular expressions of the Perl language and the UNIX-systems. To process XML-documents can be used as a standard DOM and SAX, and the API for XSLT-transformations.
To create the e-commerce application, there are a number of useful functions, such as a function of the payment Cybercash, CyberMUT, VeriSign Payflow Pro and CCVS.
Bookmarks