Home  >  Article  >  Backend Development  >  PHP execution process, php execution_PHP tutorial

PHP execution process, php execution_PHP tutorial

WBOY
WBOYOriginal
2016-07-12 08:55:35778browse

PHP execution process, php execution

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. Compilation error.

Grammar analysis, mainly to determine whether the grammatical structure is correct. For example: whether the process control structure is completed.

Result: 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:

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1116662.htmlTechArticlePHP execution process, php execution PHP execution process The source code of any language cannot be directly executed by the computer. It needs to be Convert it into machine instructions that the computer can recognize. PHP also...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn