[PHP source code learning] from receiving requests to executing

Source: Internet
Author: User

Connect to the above

The PHP module is started. Now the PHP file has been requested.
This function is used to process static int php_handler (request_rec * r)

This function is used to determine something. Skip this function first. In fact, it is important that he executes this function php_execute_script (& zfd tsrmls_cc); this is the main function in Main. C. This function has made some judgments and initialization.

It is important to execute this function zend_execute_scripts (zend_require tsrmls_cc, null, 3, prepend_file_p, primary_file, append_file_p). Zend is core in Zend/Zend. c file.

Zend_compile_file (file_handle, type tsrmls_cc) exists in this function. Spontaneous analysis and syntax analysis are performed here, and an opcode_array is returned, which is an array of bytecode.

Then this bytecode array is executed zend_execute (eg (active_op_array) tsrmls_cc); in fact, it is to call the virtual machine and the execution process of bytecode is completed.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.