PHP execution process
The source code of any language cannot be directly executed by the computer. It needs to be converted into machine instructions that the computer can recognize.
PHP is also a high-level language and requires compilation (interpretation)
PHP parsing process:
1. Request source code, perform lexical analysis and syntax analysis.
Lexical analysis mainly reads and judges the words in the source code one by one. During lexical analysis, if there is an error, an error will be reported. Compile Error.
Grammar analysis mainly determines whether the grammatical structure is correct. For example: whether the process control structure is completed.
Result: It is executable machine code
2. Execution. During execution, it mainly operates on memory. Errors may also occur during execution. At this time, the error attribute execution error occurs.
Result: pure html code.
Illustration:
The above introduces the PHP execution process, including PHP content. I hope it will be helpful to friends who are interested in PHP tutorials.