PHP C extension boilerplate code generator

PHP2C is a PHP to C converter that can be used to improve your productivity when writing more complicated PHP extensions in C. With PHP2C you can simply describe classes, interfaces and global functions in PHP language and PHP2C will generate skeleton of your new PHP extension.

PHP2C supports classes, interfaces, methods, functions, properties, default values and also prefills the implementa­tions of functions and methods with some basic parameter parsing and checking.

The code is fairly complete and useful.


Get the code here: php2c.tar.gz (released 2009–01–28)

Installation and use


Public Domain

Author and contact information

Ondřej Jirman <>, 2009