"Elaborate PHP" Chapter II, Fourth Edition sample chapter PHP application and development 4

2.4 PHP development

When originally created, PHP is a simple program written in Perl, just to count how many visitors your site. And later rewritten in C language, over the years, PHP through constant iteration of countless open source contributors, after several versions, has become the most popular Web development language current. Like Facebook, Taobao early are written in PHP, in China, more than PHP application in Baidu, Sina, Tencent and other large Internet companies.

 

2.4.1 PHP is born

In 1994 the Danes Rasmus Lerdorf (Moss Rene Gonzalez Astoria) created PHP, originally just a simple set of Perl scripts for tracking accesses to his online information. He gave it a script named "Personal Home Page Tools". He later rewritten in C language, including access to the database. In 1995, the first version released to the public to Personal Home Page Tools (PHP Tools) start, Lerdorf wrote some documentation describes this program, and released PHP1.0.

In this early version, only a simple function like this guest book, visitor counters. After more and more sites using PHP, and urged to add some features, such as loop and an array of variables.

 

2.4.2 PHP iterative process

PHP from birth to now have 20 years of history, from the rise of the mobile Internet era of ebb Web, the Internet field a variety of programming languages ​​and technologies emerging, Node.js, Go, Python constantly challenge the status of PHP. PHP language has been able to have the status of today, thanks to its designers have been complied with pragmatism, the technical complexity hidden in the ground floor. PHP has been active in maintenance and upgrades, although each language has its drawbacks, some companies or developers grass is always greener try a variety of new languages, but there are still hundreds of thousands of global power PHPer support PHP, and Zend have company endorsement, PHP must also times iterate and polish. To PHP 7 version, now the concept of extreme performance requirements of the development team, it has been updated dramatically already proved this point. PHP follows the iteration history.

Ø 2nd edition rewritten in C language and named PHP / FI

In mid-1995, the new members to join the ranks of the development, PHP 2.0 was released. The second edition named PHP / FI (Form Interpreter). PHP / FI added support for database mSQL, since then established a position in the dynamic PHP web development. By the end of 1996, more than 15,000 websites using the PHP / FI; by the year 1997, PHP / FI 2.0 is its C language implementation of Release 2 has spent thousands of users worldwide and about 50,000 domain names installation, which is about 1% of all domain names. While there were several people contributing bits of code to the project, it is still just a man's work. PHP / FI 2.0 After a few beta versions released in November 1997 released the official version.

Ø two Israeli developers to add and rename PHP3

In mid-1997, began the third version of the development plan, two Israelis Andi Gutmans and Zeev Suraski found PHP / FI 2.0 severely underpowered for developing an eCommerce application is a university project, so they rewrite code. After a series of efforts Rasmus, Andi and Zeev, taking into account the user base PHP / FI already exist, they decided to jointly release PHP 3.0 as the official successor version of PHP / FI 2.0, and version 3 directly named PHP 3.0. The PHP / FI 2.0 was mostly halted. PHP 3.0 is similar to the first version of PHP as of today, one of the most powerful features is its scalability. In addition to providing infrastructure, databases, protocols and API to your end users, it's scalability also attracted a large number of developers to join in and submit new module. Arguably, this is the key to PHP 3.0's tremendous success. Other key features of PHP 3.0 include support for object-oriented and more powerful and coordinated grammatical structure. This new language along with a new name of the publication, that removed the implication "of this language is limited to personal use" part of the name of the PHP / FI 2.0 in, it was named as a simple acronym "PHP". This is a recursive acronym, which stands for --PHP: Hypertext Preprocessor. After the public beta for about nine months, an official in June 1998 officially released PHP 3.0.

PHP 3.0 with Apache server cohesive properties, plus it constantly update and add new features; it supports almost all mainstream and non-mainstream database; high-speed efficiency, making use PHP site in 1999, more than 150,000 . Then PHP source code is completely open, the growth of the "open source" consciousness today, it is the mainstay in this area. Constantly adding new libraries, as well as constantly updated, making PHP matter can have more new features on UNIX, Linux or Win32 platform. It provides a wealth of functions that has a better program design support.

Ø introduction of "Zend Engine" and set up a company Zend

The winter of 1998, PHP 3.0 official release soon, Zeev Suraski and Andi Gutmans began to re-write PHP code. The goal is to enhance the modularity of design complexity and performance when running PHP code itself. PHP 3.0 new features and a wide range of third-party databases, API support makes writing such a program possible, but the ability to PHP 3.0 is not efficient to handle such a complex program.

The new engine, dubbed "Zend" (And this is the abbreviation of Zeev and) successfully achieved the design goals, and PHP was first introduced in mid-1999. Created by Zeev and Andi two people Zend company, due to the authority of their international technology, Zend's creator and his sustained at the core of leadership in the PHP and open source community, for the rapid development of PHP has played a strong role.

Based on Zend engine and incorporates new features of PHP 4.0, released in May 2000, the official version. The core of the script significantly change, so that program execution speed, faster to meet the requirements. Efficiency after optimization, has better performance than traditional CGI or ASP and other procedures. And there are more new features, richer library. In addition to higher performance version, PHP 4.0 contains a number of other key features, such as supporting more Web servers, HTTP Sessions support, an output buffer, the user input method for safer handling, some new language structure.

Ø From the beginning supports object-oriented PHP 5

After PHP 5 development and several pre-release version for a long time, and in July 2004 released the official version. Its core is the Zend Engine 2.0 with a new object model and a large number of new features can be programmed using an object-oriented thinking, this is PHP and a new breakthrough in the field of programming. Although PHP 5.0 did not bring substantial performance boost, 4 and even slower in some cases than PHP, a team led by Dmitry Stogov the strong help from the community has been constantly optimized language in subsequent versions, in PHP 5.6 when released, in most cases, performance improvements between 1.5 and 3 times.

Ø In fact, PHP 6 is a failed version

PHP 6 development began in 2005, wanted to make PHP supports Unicode strings. Since PHP 6 development progress is too slow and there have been many problems, and development stalled, leading to PHP 6 was canceled in 2010. In fact, very few people used PHP 6, in the absence of new versions appear before, also have been using PHP 5.

Ø hope the next generation of PHP NG branch

Since PHP 6 branches are occupied, shortly after the release of Zend Dmitry Stogov branch called the PHPNG PHP (PHP Next-Gen) of. PHP NG (also known as PHP 5.7) is the key to remain on the compatibility of PHP 5.6, first released in mid-January 2014, and has conducted landmark updated again in early May the same year, and has a speed of PHP upgrade more and more ideas. By mid-July the same year, these efforts finally results, performance tests show that the development version of PHP 5.6 has a contrast enhance nearly 1 times. In the test renders on the front pages of WordPress 3.6, the same page, PHP 5.6 rendering 1000 took 26.756 seconds, while PHP NG took 14.810 seconds. The performance secret is nearly 60% of CPU instructions to be replaced by more efficient code. PHP 5.6 100 performs rendering requires 9413106833 CPU instruction, and PHP NG only 3627440773 instruction.

 

2.4.3 PHP now

PHP is now age 7, December 2015 release of PHP 7.0 has made a major breakthrough, and will bring significant performance improvements and new features, and improved some outdated features. The release version will focus on strengthening, from PHP version PHP NG branch of the tree in terms of performance. The time of this press time, there are three functions of PHP 7 versions, namely 7.0.x, 7.1.x, 7.2.x, current development of new projects have been started using PHP PHP 7 this version. Relative to the previous version is mainly carried out to enhance the performance of official data performance can be doubled, PHP 7.1.x more a complement to the 7.0.x unfinished work, to do the biggest improvement is to increase related to a type inference system plus a type intermediate code execution engine. The current highest version PHP 7.2.x, mainly with respect to PHP 7.1.x version is optimized in OPcache (PHP script by pre-compiled byte code stored in the shared memory, in order to improve the performance of PHP, storage precompiled benefits bytecode is eliminating the overhead of each load and parse the PHP script, introduced in version 5.5 later PHP).

 

2.4.4 PHP Future

As a veteran of the back-end Web programming language, PHP share of the global market is very high, second only to Java, the data from various job sites to see so many jobs PHP development, salary levels are also very good. Actual SMEs, Internet start-ups, PHP's market position is higher than that of Java. Java bigger advantage in large enterprises, the traditional software industry, the financial sector. For now, Node.js, Go, Python, Ruby and other languages ​​also difficult to match PHP and Java. Web development in PHP is the king, and now many terminal application development, the explosive growth of Internet users, now do not deny that there is a lack of PHP in some places, such as building micro-services, service-level system of permanent memory intensive computing, big data ecological building and so on.

PHP language portal is simple, easy to grasp, a good program robustness, not prone to other languages ​​like Java, C ++, etc. as complicated issue. PHP official standard library is very powerful, various functions can be found in the official functions of the standard library, including MySQL, Memcache, Redis, GD Graphics Library, CURL, XML, JSON, etc., eliminating the developer to find a library full of trouble . PHP documentation is great, every function has a detailed description and usage examples. Third-party libraries and tools, code, the project is also very rich. Developers can quickly and efficiently written in PHP and developing all kinds of software. So far, the market is still there have been no more than a simple-to-use programming language PHP. So PHP outlook is still very broad, tangled in its choice of programming language, not as a good in-depth learning to use PHP.

 

Guess you like

Origin www.cnblogs.com/itxdl/p/11361652.html