views:

18

answers:

1

There seem to be so many half-documented ways of writing extensions for PHP in Windows. Can anyone point me to source code which demonstrates an extension compiled under VS2008 and working in a PHP 5.3.x environment?

+1  A: 

The only thing special about PHP extensions in Windows is that they use a file named config.w32 instead of config.m4. See How do I get my PECL extension compiling on Windows?.

Once this is done, the recommended way is to setup a PHP SDK. Follow these instructions, they include how to add extensions.

Artefacto
http://wiki.php.net/internals/windows/stepbystepbuild gives instructions for setting up a build environment and for adding extensions. What they don't give is how to __write__ extensions.
boost
@boost Writing extensions in Windows is the same as writing extensions elsewhere, with the exception I gave. If you want to know how to write extensions in general, see http://stackoverflow.com/questions/2970682/how-to-develop-c-extentions-for-php-apps
Artefacto