[php-src] master: Zend: remove goto in zend_is_callable_at_frame()

From: Date: Fri, 31 Jul 2026 12:56:48 +0000
Subject: [php-src] master: Zend: remove goto in zend_is_callable_at_frame()
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-140370@lists.php.net to get a copy of this message
Author: Gina Peter Banyard (Girgias) Date: 2026-07-31T13:56:30+01:00 Commit: https://github.com/php/php-src/commit/af7a6c704a2125ba8fb5b6fb2d9590622074133a Raw diff: https://github.com/php/php-src/commit/af7a6c704a2125ba8fb5b6fb2d9590622074133a.diff Zend: remove goto in zend_is_callable_at_frame() But moving the call into the switch statement rather than trying to understand this code flow. Changed paths: M Zend/zend_API.c Diff: diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 5e5f39213f39..28f24774b71c 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -4186,7 +4186,6 @@ ZEND_API bool zend_is_callable_at_frame( return 1; } -check_func: ret = zend_is_string_callable(Z_STR_P(callable), frame, fcc, strict_class, error, check_flags & IS_CALLABLE_SUPPRESS_DEPRECATIONS); if (fcc == &fcc_local) { zend_release_fcall_info_cache(fcc); @@ -4238,10 +4237,13 @@ ZEND_API bool zend_is_callable_at_frame( } } - callable = method; - goto check_func; + ret = zend_is_string_callable(Z_STR_P(method), frame, fcc, strict_class, error, check_flags & IS_CALLABLE_SUPPRESS_DEPRECATIONS); + if (fcc == &fcc_local) { + zend_release_fcall_info_cache(fcc); + } + return ret; } - return 0; + case IS_OBJECT: if (Z_OBJ_HANDLER_P(callable, get_closure) && Z_OBJ_HANDLER_P(callable, get_closure)(Z_OBJ_P(callable), &fcc->calling_scope, &fcc->function_handler, &fcc->object, 1) == SUCCESS) { fcc->called_scope = fcc->calling_scope;

« previous php.cvs (#140370) next »