To fulfill a web scripting language, three parts are required: 1. analyze the input code, and translate and perform the 2. function part, fulfillment language efficacy request 3. a dialog with the web server section zend performs the first part and the second part, while php performs the rest.
To fulfill a web scripting language, three parts are required:
1. analyze input code, translate and perform
2. efficacy part: requests to fulfill the language's efficacy
3. dialog with web servers
Zend performs the first part and the second part, while php performs the rest. Zend is the core of the language and performs some basic functions based on some predefined functions. Php contains all external function modules.
Php expansion can include three methods: 1. external module expansion; 2. compiling the module together with php during php compilation; 3. modifying the zend Engine.
The three methods have their own advantages and disadvantages. Generally, select the first one (for example, the commonly used gd Library and the mysql library used in php5). The benefit is that php does not need to be re-compiled. The disadvantage is that loading dynamic modules takes extra time.
First, let's look at the three header files:
1. php under main. H file, including many systems. H file defines many constants, functions, and macros, and determines whether some functions exist based on the system compilation environment. if not, compile these functions written in php code, using macros to define functions with the same functions but different function names in different environments.
2. the zend. h function in zend defines some data structures and contains some. h files of data structures, such as hash and list.
3. the zend_API.h file under zend defines some functions as macros, which are important for compiling php code.