[GIT-PULLS] [php-src] PR #23002: Zend: Store user error handler as an FCC

[email protected] (Girgias) Mon, 3 Aug 2026 01:11:12 +0000
Newsgroups php.git-pulls
Message-ID <[email protected]>
Pull Request: https://github.com/php/php-src/pull/23002
Author: Girgias

Currently marking as draft as I'm not sure I have a good solution to handle the static method case as they can be represented as `Class::method` or `['Class', 'method']`, and `zend_get_callable_zval_from_fcc()` always returns them as an array.

I also need more tests to confirm trampolines are handled correctly.

However, storing the error handler as an FCC will prevent redetermining if the zval is callable at every single invocation of said error handler, which I expect happens somewhat regularly.

Moreover, the refactoring here effectively cleans up the fix for the bugsnet bug 63206 done in #5206 by effectively tracking the error handler position on the stack so that we don't need to make a copy of the error handler.