Table of contents:


Without a doubt, the PHP5/ZE2 object model is more complex than its PHP4/ZE1 predecessor. After seeing all of the feature and implementation details in this chapter, you're probably a bit overwhelmed by the volume of it all. Fortunately, the layers that make up OOP within PHP enable you to pick and choose the pieces appropriate to your task and leave the rest alone. Find a good comfort level and start working upwards in complexity; the rest will follow.

Now that all of PHP's internal data types have been covered, it's time to return to an earlier topic: the request life cycle. In the next two chapters, you'll add internal state to your extension through the use of thread-safe globals, define custom ini settings, declare constants, and offer superglobals to userspace scripts using your extension.

The PHP Life Cycle

Variables from the Inside Out

Memory Management

Setting Up a Build Environment

Your First Extension

Returning Values

Accepting Parameters

Working with Arrays and HashTables

The Resource Data Type

PHP4 Objects

PHP5 Objects

Startup, Shutdown, and a Few Points in Between

INI Settings

Accessing Streams

Implementing Streams

Diverting the Stream

Configuration and Linking

Extension Generators

Setting Up a Host Environment

Advanced Embedding

Appendix A. A Zend API Reference

Appendix B. PHPAPI

Appendix C. Extending and Embedding Cookbook

Appendix D. Additional Resources

Extending and Embedding PHP
Extending and Embedding PHP
ISBN: 067232704X
EAN: 2147483647
Year: 2007
Pages: 175
Authors: Sara Golemon

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net