This is a simple PHP Extension example.
These files could be generated automatically by php5/ext/ext_skel
command in PHP5 source code.
$ cd /path/to/php5/ext
$ ./ext_skel --extname=hello
Then make a few edits following tutorial[1].
Branch list is a cool tool for recording the learning road map, as branch name hints every key knowledge and it's order.
You can get it at php.net.
But I recommend using the PHPBrew to manage your PHP version.
$ git clone git@git.corp.anjuke.com:liangshan/php-hello
$ cd php-hello
$ /path/to/phpize
$ ./configure
$ make && make install
just run
$ php hello.php