From 15215f9702225fa8e42b0658792272d145181b55 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Sat, 5 Oct 2024 15:16:49 +0200 Subject: [PATCH] Unify types of PHP_VERSION and friends on Windows For `phpize` builds, all three version variables are numbers, but for `buildconf` builds, all are strings. This can yield surprising results when extensions create their `PHP_VERSION_ID` like 10000 * PHP_VERSION + 100 * PHP_MINOR_VERSION + PHP_RELEASE_VERSION Since `phpize` builds are way more common for external extensions nowadays, we change the types for `buildconf` builds. --- win32/build/confutils.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/win32/build/confutils.js b/win32/build/confutils.js index 438956cbb602c..479ce06ad5015 100644 --- a/win32/build/confutils.js +++ b/win32/build/confutils.js @@ -108,9 +108,9 @@ function get_version_numbers() var regex = /AC_INIT.+(\d+)\.(\d+)\.(\d+)([^\,^\]]*).+/g; if (cin.match(new RegExp(regex))) { - PHP_VERSION = RegExp.$1; - PHP_MINOR_VERSION = RegExp.$2; - PHP_RELEASE_VERSION = RegExp.$3; + PHP_VERSION = +RegExp.$1; + PHP_MINOR_VERSION = +RegExp.$2; + PHP_RELEASE_VERSION = +RegExp.$3; PHP_EXTRA_VERSION = RegExp.$4; }