O'Reilly logo

Advanced PHP Programming by George Schlossnagle

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required