diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 1b12c4a8ff7..9bf1bf28141 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -3101,9 +3101,11 @@ function toolset_get_compiler_name(short) version = probe_binary(PHP_CL).substr(0, 5).replace('.', ''); - if (version >= 1930) { + if (version >= 1940) { return name; - } if (version >= 1920) { + } else if (version >= 1930) { + name = short ? "VS17" : "Visual C++ 2022"; + } else if (version >= 1920) { /* NOTE - VS is intentional. Due to changes in recent Visual Studio versioning scheme referring to the exact VC++ version is hardly predictable. From this version on, it refers to diff --git a/win32/winutil.c b/win32/winutil.c index 3d41873310f..e09944d131b 100644 --- a/win32/winutil.c +++ b/win32/winutil.c @@ -448,7 +448,7 @@ static zend_always_inline BOOL is_compatible(HMODULE handle, BOOL is_smaller, ch DWORD minor = pNTHeader->OptionalHeader.MinorLinkerVersion; #if PHP_LINKER_MAJOR == 14 - /* VS 2015, 2017 and 2019 are binary compatible, but only forward compatible. + /* VS 2015, 2017, 2019 and 2022 are binary compatible, but only forward compatible. It should be fine, if we load a module linked with an older one into the core linked with the newer one, but not the otherway round. Analogously, it should be fine, if a PHP build linked with an older version