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)

The repository can be found on GITHUB:…s/php2c/tree

Installation and use

How you can help to improve the application

Feel free to create branches in the project's re­pository on GITHUB or send me patches or pull requests for your changes.


Public Domain

Author and contact information

Ondřej Jirman <>, 2009