From e7891838a18c303f4844b455c2ed04670519ffb9 Mon Sep 17 00:00:00 2001 From: Gina Peter Banyard Date: Mon, 11 Nov 2024 03:24:16 +0000 Subject: [PATCH] ext/standard: Sync parameter names for fpow() to be identical to pow() Closes GH-16751 --- NEWS | 3 +++ ext/standard/basic_functions.stub.php | 2 +- ext/standard/basic_functions_arginfo.h | 7 +++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 3af5e4e680b..3e7908c3560 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,9 @@ PHP NEWS - PDO: . Fixed memory leak of `setFetchMode()`. (SakiTakamachi) +- Standard: + . Fixed parameter names of fpow() to be identical to pow(). (Girgias) + 07 Nov 2024, PHP 8.4.0RC4 - BcMath: diff --git a/ext/standard/basic_functions.stub.php b/ext/standard/basic_functions.stub.php index 68cc86e7b1f..cd5df4d2011 100644 --- a/ext/standard/basic_functions.stub.php +++ b/ext/standard/basic_functions.stub.php @@ -3276,7 +3276,7 @@ function fdiv(float $num1, float $num2): float {} /** * @compile-time-eval */ -function fpow(float $num1, float $num2): float {} +function fpow(float $num, float $exponent): float {} /* microtime.c */ diff --git a/ext/standard/basic_functions_arginfo.h b/ext/standard/basic_functions_arginfo.h index e4292811250..e9035c78621 100644 --- a/ext/standard/basic_functions_arginfo.h +++ b/ext/standard/basic_functions_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 504f4172ac1d64535719234888400063eb37361b */ + * Stub hash: b15d2f9fa727a78e6fa4d5c60a65d8848f655fe2 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_set_time_limit, 0, 1, _IS_BOOL, 0) ZEND_ARG_TYPE_INFO(0, seconds, IS_LONG, 0) @@ -1724,7 +1724,10 @@ ZEND_END_ARG_INFO() #define arginfo_fdiv arginfo_fmod -#define arginfo_fpow arginfo_fmod +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_fpow, 0, 2, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO(0, num, IS_DOUBLE, 0) + ZEND_ARG_TYPE_INFO(0, exponent, IS_DOUBLE, 0) +ZEND_END_ARG_INFO() #if defined(HAVE_GETTIMEOFDAY) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_microtime, 0, 0, MAY_BE_STRING|MAY_BE_DOUBLE)