Приглашаем посетить
Орловка (orlovka.niv.ru)

Chapter 23.  Writing SAPIs and Extending the Zend Engine

Previous
Table of Contents
Next

23. Writing SAPIs and Extending the Zend Engine

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 most out of the existing SAPI implementations. Do you like mod_php but feel like it's missing a feature? Understanding how SAPIs work can help you solve your problems. Do you like PHP but wish the Zend Engine had some additional features? Understanding how to modify its behavior can help you solve your problems.


Previous
Table of Contents
Next