From da264b4d8a6ba090c194e02f9f44f1df15048734 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 12 Oct 2025 21:32:39 +0200 Subject: [PATCH 1/2] zend_operators: Remove `_zval_get_*()` PHP 7.2 compatibility macros These have been unused for long enough and just pollute the symbol namespace. --- UPGRADING.INTERNALS | 2 ++ Zend/zend_operators.h | 8 -------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index ada814964fc5f..27c766365b85b 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -22,6 +22,8 @@ PHP 8.6 INTERNALS UPGRADE NOTES added, given the primary flags were running out of bits. . The zval_is_true() alias of zend_is_true() has been removed. Call zend_is_true() directly instead. + . The `_zval_get_*()` compatibility macros for PHP 7.2 have been removed + call the variant without the leading underscore instead. ======================== 2. Build system changes diff --git a/Zend/zend_operators.h b/Zend/zend_operators.h index 4a74e6ebaefe9..ff31c84c41e5e 100644 --- a/Zend/zend_operators.h +++ b/Zend/zend_operators.h @@ -390,14 +390,6 @@ static zend_always_inline bool try_convert_to_string(zval *op) { return _try_convert_to_string(op); } -/* Compatibility macros for 7.2 and below */ -#define _zval_get_long(op) zval_get_long(op) -#define _zval_get_double(op) zval_get_double(op) -#define _zval_get_string(op) zval_get_string(op) -#define _zval_get_long_func(op) zval_get_long_func(op) -#define _zval_get_double_func(op) zval_get_double_func(op) -#define _zval_get_string_func(op) zval_get_string_func(op) - #define convert_to_string(op) if (Z_TYPE_P(op) != IS_STRING) { _convert_to_string((op)); } From 611100a0fd8a8f07621db6143e9bf5556fb9d1b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 14 Oct 2025 10:19:26 +0200 Subject: [PATCH 2/2] [skip ci] UPGRADING.INTERNALS: Explicitly list all affected functions --- UPGRADING.INTERNALS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 27c766365b85b..eab5ad233be3c 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -22,8 +22,10 @@ PHP 8.6 INTERNALS UPGRADE NOTES added, given the primary flags were running out of bits. . The zval_is_true() alias of zend_is_true() has been removed. Call zend_is_true() directly instead. - . The `_zval_get_*()` compatibility macros for PHP 7.2 have been removed + . The _zval_get_*() compatibility macros for PHP 7.2 have been removed call the variant without the leading underscore instead. + Affected: _zval_get_long, _zval_get_double, _zval_get_string, + _zval_get_long_func, _zval_get_double_func, _zval_get_string_func ======================== 2. Build system changes