15 Excellent Resources for PHP Extension DevelopmentSep 20, 2010 · 2 minute read
Whilst developing a PHP extension recently I spent quite a bit of time researching exactly how to create an extension, the best practices and the DocBook format of the PHP manual for documenting the extension.
By the time I finished writing the extension I had found some very good resources both on the web and in print.
- Sara Golemon’s Extending and Embedding PHP
- Advanced PHP Programming by George Schlossnagle
- Building Custom PHP Extensions by Blake Schwendiman
Online articles and presentations:
- The Internals section of the PHP manual
- Kristina Chodorow’s PHP Extensions Made Eldrich on her blog in 2011:
- Sara Golemon’s Zend DevZone articles with parts I, II and III (2005, 2006):
- Wez Furlong’s Extending PHP slides
- Marcus Börger and Johannes Schlüter: PHP Extension Writing slides
- O’Reilly Programming PHP Chapter 14: Extending PHP
- Paul Osman’s Wrapping C++ Classes in a PHP Extension article on Zend DevZone
Documenting PHP and PECL extensions:
- PHP Wiki: Documentation Introduction
- PHP Wiki: Editing Documentation
- PHP Documentation Team: How to pages
- PHP Wiki: Documenting PECL Extensions
Pyrus can also be used to package your extension up for release using the pickle command.
Whilst not strictly for PHP extensions the Autotools: a practitioner’s guide to Autoconf, Automake and Libtool book by John Calcote on the Free Software Magazine is very useful reading for an understanding of the build process involved in extension writing.
This article has been updated a number of times as it is reasonably popular and new resources have become available since it was written.
Since writing this article a new Wiki article has been added on php.net with a list of resources. Some of which I have not already covered here.