PHP's core is made up of two separate pieces. At the lowest levels you find the Zend Engine (ZE) . ZE handles parsing a human-readable script into machine-readable tokens, and then executing those tokens within a process space. ZE also handles memory management, variable scope, and dispatching function calls. The other half of this split personality is the PHP core . PHP handles communication with, and bindings to, the SAPI layer (Server Application Programming Interface, also commonly used to refer to the host environment - Apache, IIS, CLI, CGI, etc). It also provides a unified control layer for safe_mode
and open_basedir
checks, as well as the streams layer which associates file and network I/O with userspace functions like fopen()
, fread()
, and fwrite()
.
[http://devzone.zend.com/article/1021-Extension-Writing-Part-I-Introduction-to-PHP-and-Zend]