From d9f48e25b291fe015dffdd2e227cbe738ac91dc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 16 Nov 2026 16:10:51 +0100 Subject: [PATCH] main: Remove `PHP_API_VERSION` This one is not actually referenced anywhere (except being printed in phpinfo). --- UPGRADING.INTERNALS | 2 ++ ext/standard/info.c | 3 --- ext/standard/tests/general_functions/phpinfo.phpt | 1 - main/php.h | 1 - scripts/phpize.in | 2 -- 5 files changed, 2 insertions(+), 7 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index a92ef2d87a1d..c27248d88c9d 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -55,6 +55,8 @@ PHP 8.7 INTERNALS UPGRADE NOTES to work. . The ZTS symbols compiler_globals_offset and executor_globals_offset have been removed: CG()/EG() now reach the globals through a __thread struct. + . The unused PHP_API_VERSION was removed. ABI compatibility is verified + against ZEND_MODULE_API_NO and ZEND_EXTENSION_API_NO. - Changed: . The signature of zend_is_callable() has been changed to diff --git a/ext/standard/info.c b/ext/standard/info.c index 097f5900bc32..4fa6e1c93711 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -831,9 +831,6 @@ PHPAPI ZEND_COLD void php_print_info(int flag) php_info_print_table_row(2, "Scan this dir for additional .ini files", php_ini_scanned_path ? php_ini_scanned_path : "(none)"); php_info_print_table_row(2, "Additional .ini files parsed", php_ini_scanned_files ? php_ini_scanned_files : "(none)"); - snprintf(temp_api, sizeof(temp_api), "%d", PHP_API_VERSION); - php_info_print_table_row(2, "PHP API", temp_api); - snprintf(temp_api, sizeof(temp_api), "%d", ZEND_MODULE_API_NO); php_info_print_table_row(2, "PHP Extension", temp_api); diff --git a/ext/standard/tests/general_functions/phpinfo.phpt b/ext/standard/tests/general_functions/phpinfo.phpt index a7503ec0bc41..27b88b9fda71 100644 --- a/ext/standard/tests/general_functions/phpinfo.phpt +++ b/ext/standard/tests/general_functions/phpinfo.phpt @@ -24,7 +24,6 @@ Configuration File (php.ini) Path => %s Loaded Configuration File => %r(.+?)%r Scan this dir for additional .ini files => %r(.+?)%r Additional .ini files parsed => %r(.+?)%r -PHP API => %d PHP Extension => %d Zend Extension => %d Zend Extension Build => API%s diff --git a/main/php.h b/main/php.h index e5a6d6f9633f..59929f653eb4 100644 --- a/main/php.h +++ b/main/php.h @@ -20,7 +20,6 @@ #include #endif -#define PHP_API_VERSION 20261113 #define YYDEBUG 0 #define PHP_DEFAULT_CHARSET "UTF-8" diff --git a/scripts/phpize.in b/scripts/phpize.in index 8e99fa1d6d6c..5e3e5959e88a 100644 --- a/scripts/phpize.in +++ b/scripts/phpize.in @@ -61,7 +61,6 @@ phpize_get_api_numbers() # extracting API NOs: PHP_MINOR_VERSION=`grep '#define PHP_MINOR_VERSION' $includedir/main/php_version.h|$SED 's/#define PHP_MINOR_VERSION //'` PHP_MAJOR_VERSION=`grep '#define PHP_MAJOR_VERSION' $includedir/main/php_version.h|$SED 's/#define PHP_MAJOR_VERSION//'` - PHP_API_VERSION=`grep '#define PHP_API_VERSION' $includedir/main/php.h|$SED 's/#define PHP_API_VERSION//'` ZEND_MODULE_API_NO=`grep '#define ZEND_MODULE_API_NO' $includedir/Zend/zend_modules.h|$SED 's/#define ZEND_MODULE_API_NO//'` ZEND_EXTENSION_API_NO=`grep '#define ZEND_EXTENSION_API_NO' $includedir/Zend/zend_extensions.h|$SED 's/#define ZEND_EXTENSION_API_NO//'` } @@ -71,7 +70,6 @@ phpize_print_api_numbers() phpize_get_api_numbers echo "Configuring for:" echo "PHP Version: ${PHP_MAJOR_VERSION}.${PHP_MINOR_VERSION}" - echo "PHP Api Version: "$PHP_API_VERSION echo "Zend Module Api No: "$ZEND_MODULE_API_NO echo "Zend Extension Api No: "$ZEND_EXTENSION_API_NO }