Tutorial Day: Create your own PHP Extension step by step
Ever been interested by contributing to the PHP core team? In this workshop you will not only learn how (easy it is) to create your own PHP extension from scratch but you will also strengthen your knowledge of PHP by disecting its internals. After this workshop, you will be able to create an extension on your own, whether it is to optimize the most CPU intensive parts of your code, to create new bindings to C libraries or just to leverage your PHP knowledge. And what if PHP was a web framework for the C developer? This workshop requires a bit of C knowledge and preferably a *nix system.
Questions & Answers
Who’s the target audience for this tutorial?
- Advanced PHP developers that would like to extend, contribute to, hack, know more about,… the PHP language.
- C developers that has to provide binding to their libraries to PHP.
How experienced do I need to be?
Very basic knowledge of C/C++ is required to follow the exercises.
Which version of software / php etc* will you be covering?
We will use PHP 5.4 during the workshop but the exercises should also work with lower version of PHP.
Do I need to bring a laptop?
Yes
Do I need to install or set-up any specific software prior to the day, in order to get the most out of the day?
Yes:
Git for being able to clone the skeleton repository used for the exercises.
The requirements are about the same as for being able to compile PHP
itself, from: http://php.net/git.php
- autoconf: 2.13 (2.59+ for PHP 5.4+)
- automake: 1.4+
- libtool: 1.4.x+ (except 1.4.2)
- bison: 1.28, 1.35, 1.75, 2.0 or higher
- flex (PHP 5.2 and earlier): 2.5.4 (not higher)
- re2c: 0.13.4+
Note that if you have a debian based system, you might easily install
all required dependencies by installing packages:
git, php5-dev and make
Q: What else will I get?
A: Refreshments and lunch, a personalised attendance certificate and a conference T-shirt!
Patrick Allaert
Patrick Allaert is a freelance system engineer and founder of Libereco Technologies, a Brussels based company specialized in PHP services. Using PHP since the early days of PHP 3, he is contributing/hacking on a wide variety of projects including PHP, eZ Publish, Linux and KDE. In his spare time, he also works on the PHP monitoring extension: APM for which he is the lead developer. Those activities doesn’t give him much more time to blog or to tweet (@patrick_allaert).
Derick Rethans
Derick Rethans is a PHP internals expert, author of Xdebug and an OpenStreetMap and mapping enthusiast. He has contributed in a number of ways to the PHP project, including the Xdebug debugging tool, and various extensions and additions. He’s a frequent lecturer at conferences, the author of php|architect’s Guide to Date and Time Programming, and the co-author of PHP 5 Power Programming. He’s now working with 10gen to help improve the MongoDB PHP driver.