[php-src] PR #21879: Fix GH-17126: get_class_methods omits __invoke for Closure

From: Date: Mon, 27 Apr 2026 01:58:33 +0000
Subject: [php-src] PR #21879: Fix GH-17126: get_class_methods omits __invoke for Closure
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-35902@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/21879 Author: iliaal Closure::__invoke is documented and reachable via method_exists() and ReflectionClass (getMethod, hasMethod, getMethods), but get_class_methods() walks ce->function_table directly and Closure does not register __invoke there: the parameter list is materialized per-instance by zend_get_closure_invoke_method(). get_class_methods() now appends __invoke when ce == zend_ce_closure, the same predicate is_closure_invoke() already uses in ext/reflection. Fixes #17126

« previous php.git-pulls (#35902) next »