The flip side to writing PHP extensions in C is writing applications in C that run PHP. There are a number of reasons you might want to do this:
To allow PHP to efficiently operate on a new Web server platform.
To harness the ease of use of a scripting language inside an application. PHP provides powerful templating capabilities that can be validly embedded in many applications. An example of this is the PHP filter SAPI, which provides a PHP interface for writing
sendmail mail filters in PHP.
For easy extensibility. You can allow end users to customize parts of an application with code written in PHP.
Understanding how PHP embeds into applications is also important because it helps you get the ...