KB: warning LNK4006: "int __cdecl _open(char const * const,int,int)" (?_open@@YAHQEBDHH@Z) already defined in XXXX

If you encounter the following error when building a C++ extension for PHP:

warning LNK4006: "int __cdecl _open(char const * const,int,int)" (?_open@@YAHQEBDHH@Z) already defined in XXXX; second definition ignored

Then you need to define ZEND_WIN32_KEEP_INLINE, either as a preprocessor definition or before you include php.h.