PHP: How Did PHP Come About? History

In 1997, two Israelis, Zeev Suraski and Andi Gutmans, joined the project and decided to rewrite the parser, resulting in PHP being given a new name - PHP: Hypertext Preprocessor. The reason the code needed to be rewritten was simple - the existing code was not good enough to build e-commerce websites.

In 1997, two Israelis, Zeev Suraski and Andi Gutmans, joined the project and decided to rewrite the parser, resulting in PHP being given a new name - PHP: Hypertext Preprocessor. The reason the code needed to be rewritten was simple - the existing code was not good enough to build e-commerce websites.

The origins of PHP

At the very beginning, when the internet had just appeared, clever people thought - if there is an internet and servers, why not have information there that could be freely accessed and its content explored. And so in 1989, web servers were born, along with HTML as the standard for static web pages. But people needed more - forms, visitor counters and other "gadgets", which prompted the development of an interface in 1993 through which a binary file would be executed and the result displayed on a web page. Thus CGI (common gateway interface) was born. And programmers, each as best they could, began building interactive web pages in both Perl and C. All was well, but complex.

Why PHP?

The first version of PHP appeared in 1994, when a Dane/Greenlander named Rasmus Lerdorf created CGI binaries with the goal of making life more interesting and replacing the Perl scripts he used to build web pages. The original mission of PHP was to process forms, which is why PHP stood for Personal Home Page.

The newly created tool, although written in C, could work with databases and was quite convenient to use, as well as simpler than Perl.

In 1997, two Israelis, Zeev Suraski and Andi Gutmans, joined the project and decided to rewrite the parser, resulting in PHP being given a new name - PHP: Hypertext Preprocessor. The reason the code needed to be rewritten was simple - the existing code was not good enough to build e-commerce websites. Thus PHP 3 was born. By 1998, PHP was being used on 10% of web servers.

Shortly after the public release of PHP 3, these same Israelis got to work and rewrote the PHP core once more, creating the Zend Engine. In 1999, the organisation Zend Technologies was also founded, with its administrative office in Cupertino, California, USA, and technology centres in Ramat Gan and Tel Aviv, Israel. Starting with PHP 4, a wide range of modules for working with various databases was created. Performance improved significantly. Critical fixes for PHP 4 continued to be released until 8 August 2008.

Why Zend? It turns out this is a portmanteau - a blend of the two authors' names, Zeev and Andi.

PHP 5 introduced more powerful OOP (object-oriented programming) support.

PHP 6 will bring full Unicode support.

On the PHP language

In my opinion, the basis of PHP's success lies in the following characteristics:

  • No need to declare variables. Moreover - their types can be changed during code execution.
  • Tight integration with HTML and the use of the clause within an HTML document.
  • No compilation required;
  • Extensive (often built-in) database support;
  • Many and various modules (mb_strings, gd, uc)
  • In the event of fatal errors - "nothing terrible happens". i.e., the server keeps running.
  • A very well-documented language;
  • An intuitive language;

Although, in general, functions and constructs are preserved from version to version, some things do change, meaning one cannot safely claim that code written for a previous PHP version will work after a version upgrade. This is also noted in criticisms (see [3])

For example.
In PHP5, the object constructor is __construct(), whereas in PHP4 it is a function with the same name as the class.
Starting with PHP 5.3, register_globals and magic_quotes will no longer exist. The latter, it must be said, was very widely used.
Starting with PHP 5.3 there will also be truly anonymous functions, which look rather unfamiliar to my eye, but they look like this:

function getAdder($x)
{
return function ($y) use ($x) {
return $x + $y;
};
}

$adder = getAdder(8);
echo $adder(2); // prints "10"


A few PHP tricks, or cheats, or "Easter eggs" :)

For example:
by entering ?=PHPE9568F36-D428-11d2-A769-00AA001ACF42 on any server running PHP 4 or 5, you'll get a "crooked" PHP logo;

?=PHPE9568F34-D428-11d2-A769-00AA001ACF42 – gives a slightly nicer PHP logo;

?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 – Zend logo;

?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000 gives the names of all the people who contributed to the creation of PHP

 
[1] http://en.wikipedia.org/wiki/PHP
[2] http://www.php.net/manual/en/history.php.php
[3] http://ru.wikipedia.org/wiki/PHP

Share:
Rate: 4 (5)
Views:

comments



What are others reading?