[php-src] PR #23002: Zend: Store user error handler as an FCC
| From: | Girgias | Date: | Mon, 03 Aug 2026 01:11:12 +0000 |
| Subject: | [php-src] PR #23002: Zend: Store user error handler as an FCC | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-37459@lists.php.net to get a copy of this message | ||
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.