1. Zend engine is part of the PHP core.
Completely implemented in pure C, it translates PHP code (a series of compilation processes such as lexical and syntax analysis) into executable opcode, and implements corresponding processing methods to achieve basic data structures (such as hashtable, oo), memory allocation and Management and providing corresponding api methods for external calls are all core, and all peripheral functions are implemented around Zend.
2. Extensions provide various basic services in a component-based manner.
Around the Zend engine, through extensions, various commonly used built-in functions (such as the array series), standard libraries, etc. can be implemented through extensions. Users can also implement their own extensions as needed to achieve purposes such as function expansion and performance optimization. (For example, in the PHP middle layer used by Table, rich text parsing is a typical application of extension).
3. Sapi is the server application programming interface.
Sapi enables PHP to interact with external data through a series of hook functions. This is another way to successfully separate PHP itself and upper-layer applications through sapi. PHP no longer needs to consider how to be compatible with different applications, and applications It can achieve different processing according to its own characteristics.
4. Application is the PHP program we usually write.
It can obtain various application modes through different sapi, such as implementing web applications through webserver, implementing script operations through the command line, etc.
The above is an introduction to the core architecture of PHP. I hope it will be helpful to everyone.