[php-src] master: Zend: change signature of zend_is_callable()

From: Date: Tue, 29 Sep 2026 21:51:27 +0000
Subject: [php-src] master: Zend: change signature of zend_is_callable()
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-141743@lists.php.net to get a copy of this message
Author: Gina Peter Banyard (Girgias) Date: 2026-09-29T22:50:57+01:00 Commit: https://github.com/php/php-src/commit/dfbaf9e728d0b82f5e86580c49141742cf1f57f2 Raw diff: https://github.com/php/php-src/commit/dfbaf9e728d0b82f5e86580c49141742cf1f57f2.diff Zend: change signature of zend_is_callable() The current signature is effectively useless every call uses the _ex variant to be able to grab the FCC and usually the error message. Something the current signature does not provide, and instead offers parameters that most call sites don't care about. Closes GH-23996 Changed paths: M UPGRADING.INTERNALS M Zend/zend_API.h Diff: diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 82f273974cd5..24f6a1b96674 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -29,6 +29,10 @@ PHP 8.7 INTERNALS UPGRADE NOTES and C23, which means that ZEND_NORETURN needs to come first in the modifier list. Consider using noreturn (C11) / [[noreturn]] (C23) directly if header interoperability is not required. +- The signature of zend_is_callable() has been changed to + zend_is_callable(const zval *callable, zend_fcall_info_cache *fcc, char **error) + from zend_is_callable(const zval *callable, uint32_t check_flags, zend_string **callable_name). + This new signature covers the most common parameters used with zend_is_callable_ex(). ======================== 2. Build system changes diff --git a/Zend/zend_API.h b/Zend/zend_API.h index 5c4083052202..c94a71cf56b8 100644 --- a/Zend/zend_API.h +++ b/Zend/zend_API.h @@ -422,9 +422,9 @@ ZEND_API bool zend_is_callable_at_frame( const zval *callable, zend_object *object, const zend_execute_data *frame, uint32_t check_flags, zend_fcall_info_cache *fcc, char **error); ZEND_API bool zend_is_callable_ex(const zval *callable, zend_object *object, uint32_t check_flags, zend_string **callable_name, zend_fcall_info_cache *fcc, char **error); -static zend_always_inline bool zend_is_callable(const zval *callable, uint32_t check_flags, zend_string **callable_name) +static zend_always_inline bool zend_is_callable(const zval *callable, zend_fcall_info_cache *fcc, char **error) { - return zend_is_callable_ex(callable, NULL, check_flags, callable_name, NULL, NULL); + return zend_is_callable_ex(callable, NULL, 0, NULL, fcc, error); } ZEND_API const char *zend_get_module_version(const char *module_name);

« previous php.cvs (#141743) next »