Taiwan Pengwuchen wrote a special topic "The core of PHP4: Zend". Although it was written last year, it feels helpful to have a conceptual understanding of php/zend. So translate it. For the first time, the original Zend engine name was created by the name of the Zeev Suraski and Andi Gutmans two-bit senior designer in PHP as the core development work.
Author: Pengwuchen Introduction: He set up the Taiwan Cultural University of China Information Network, after graduating from NEC as a network management, and Biglobe network management. and has been in the Internet Space magazine has opened the internet Word to solve the column, published articles. In the Web, in particular, Have in-depth research and practical experience. Currently in charge of the computer network for the work of the relevant. The PHP Bible.
A. Overview:
The name of the
Zend engine is a combination of the names of Zeev Suraski and Andi Gutmans Two senior designers who work as core developers in PHP. The development of the target architect to develop new scripting execution mechanisms, PHP4 is the first implementation product of this new Zend engine. In some special test environment, Zend (php$) speed than PHP3 and ASP faster than several times to hundreds of times times, which also means that the Web site's back-end CGI interface is not a unified PHP4? Zend. (Of course, technology is progressing, and maybe there's a new engine on the day.) )
After more than two years of research and development, the
Zend engine has become a generalized programming environment similar to VBA, which not only has traditional PHP function functions, but also increases the functionality of Distributed objects (COM) and can be executed on different operating platforms. With this potential development, the Terminator of VBA is not Zend.
Zend in PHP4 on the implementation of the PHP3 before the biggest regret of the session made the most complete commitment, while adding some future functions, such as CyberCash ... Wait a minute.
Php/zend is the best example of a opensource community in which the only thing that keeps momentum but has not yet been seen by Microsoft as a competitor. It has completely left the ASP behind, is going to the environment of VBA development. Microsoft is only trying to deal with Linux, without noticing the threat from php/zend.
system diagram:
The
user's browser makes a browse request and the Web server receives the request.
The
Web server discovers PHP requirements, requires the PHP engine to parse (according to the file's extension), and sends it to the PHP4 Zend engine.
The
Zend Engine reads the file from the hard disk and sends it to the Zend Online compiler (Run-time Compiler) to work on the literal translation. (perhaps later Zend compiler out of the line can be omitted to compile work.) )
The
Zend Engine's online execution unit (excutor) executes the compiled PHP program. And when needed to find the relevant modules to perform collaborative action (such as XML,IMAP,ODBC ...) etc.).
Zend The executed results into an HTML file and sent to the Web server.
The
Web server returns the results to the user's browser via the network.
currently Zend products have the following four kinds:
The
Zend engine:zend engine Zend engine currently only makes PHP4 one product, providing similar VBA and cross-platform features like Microsoft. And the current popularity on the internet, but also for the Zend engine made the best witness. In the four products of Zend, this is the only mature product at present.
Zend optimizer:zend The core of PHP to readjust, make PHP program execution more efficient. Mainly to speed up the execution of PHP code and reduce the burden of the CPU, the latency will be reduced.
Zend Cache:zend fast access to the PHP program to the memory of the Web server, so that the system does not have to read from the hard disk PHP program, can greatly shorten the system response time, reduce network load. The existence of the cache data can not even be translated, reduce the processing of resources.
Zend Compiler:zend Compiler This is probably the ultimate weapon of Zend, which allows PHP's program code to be compiled, in the form of Zend Middle code (zic,zend Intermediate code). Can protect the source code of PHP, do not let users see, so that the source code of PHP has security. It is expected that this product will have a large impact on the entire network, PHP code of the object library will be everywhere, the software industry will also provide the relevant function library or object library to the PHP programmer. There may be a PHP vs. Java scenario.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.