Presenting the latest edition of The ZendCon Sessions. The podcast that rebroadcasts sessions/talks from the last ZendCon PHP Conference. This episode of The ZendCon Sessions was recorded live at ZendCon 2008 in Santa Clara, CA and features Sara Goleman giving her talk: “PHP Extension Writing” []
One thing the world does not lack is PHP extensions. In fact, due to PHP’s popularity the number of available extensions is quite dizzying. To date, Zend Server includes 77 PHP extensions that Zend considers essential or just very helpful for most PHP developers. Still, what if the one that your code uses is not among them? Or you wish to compile one of the extensions Zend Server is shipped with in a different way (against your own libraries or to support additional, less common features)? If this scenario sounds familiar to you, you may find this tutorial useful. []
One of the most common reasons people write extensions for PHP is to link against an external library and make available its API to PHP userspace scripts. Often the external library is written in C or C++. If you are tasked with writing such an extension that links against an object oriented C++ library, you will probably want to wrap the C++ classes and make them available to PHP userspace scripts. This is pretty easy to do once you get over a few initial hurdles. []
Up until now, you’ve worked with concepts that are familiar and map easily to userspace analogies. In this tutorial, you’ll dig into the inner workings of a more alien data type – completely opaque in userspace, but with behavior that should ultimately inspire a sense of deja vu. []
Original Content
 curl   Extension   Tutorials 
In Part One of this series you looked at the basic framework of a PHP extension. You declared simple functions that returned both static and dynamic values to the calling script, defined INI options, and declared internal values (globals). In this tutorial, you’ll learn how to accept values passed into your functions from a calling script and discover how PHP and the Zend Engine manage variables internally. []
In Part One of this series you looked at the basic framework of a PHP extension. You declared simple functions that returned both static and dynamic values to the calling script, defined INI options, and declared internal values (globals). In this tutorial, you’ll learn how to accept values passed into your functions from a calling script and discover how PHP and the Zend Engine manage variables internally. []
If you're reading this tutorial, you probably have some interest in writing an extension for the PHP language. If not... well perhaps when we're done you'll have discovered an interest you didn't know existed! []