First we create a function definition file:

bday.def
string birthday(int timestamp)
Then run the ext_skel script which creates all the required skeleton files.

% cd php4/ext
% ./ext_skel --extname=bday --proto=bday.def 
Standalone or Embedded?
At this point you have a choice on how to proceed. You can either develop your extension under the main PHP framework where you run the top-level buildconf script to include your extension in PHP's main configuration script, or you can develop your extension in a completely separate directory where you run the phpize script to populate your extension directory with all the required files.

Embedded
% cd bday
% vi config.m4
% cd ../..
% ./buildconf
% ./configure --enable-bday
% make
Standalone
% mv bday /tmp
% cd /tmp/bday
% vi config.m4
% phpize
% ./configure --enable-bday
% make