Search code examples
phpc++php-extension

Can a PHP extension be used to make calls to a C++ DLL?


I have C++ library that I would like to use to create a PHP extension. I don't have anything besides the compiled DLL file.

I would just like to know if this is possible or does it need to be a C library?


Solution

  • Yes, You can build extension using C++ libraries.

    There is a very good example describing the process here : http://devzone.zend.com/1435/wrapping-c-classes-in-a-php-extension/