Need recommendation for how to develop PHP extension

I developed a PHP encryption extension, and this is my first PHP extension developed, so not so experienced with PHP.
I found a problem with the portability of the extension: with my many years of UNIX programming experience, this is the first time I found that when an extension or program binary is developed, the PHP extension module can only work with the same module API version, means the module built on 5.1 will not work on 5.2. So if I need to distribute the module, I have to build module for each version of PHP on each platform.
Does anyone have created a standalone PHP extension and find a way how to manage this situation?

Yes, for Windows, you have to build the extension for each PHP version (and Visual C++ version too)…

For other platforms, let users build it themselves. :slight_smile: Or, if you don’t want them to have the source, then more multiple builds!