Thirdly, there is a Web server abstraction layer called SAPI that greatly simplifies the task of adding native support for new Web servers. SAPI also has the advantage of increasing PHP 4 stability, in addition to supporting multi-threaded Web servers. The following figure presents PHP 4's architecture. All of PHP's functions are part of one of the layers with a side facing up in the architecture figure. Most functions such as the MySQL support, are provided by an extension.
Most extensions are optional.
They can be linked into PHP at compile time or built as dynamically loadable extensions that can be loaded on demand. This article assumes that you are familiar with C's syntax. However, don't panic if you're not. Web servers supporting PHP will, by default, scan a file in HTML mode. HTML code will be passed over to the browser as usual, up until the server happens upon a PHP line of code.