[php-src] PR #23643: Zend: inline some Closure handling

From: Date: Thu, 10 Sep 2026 15:55:28 +0000
Subject: [php-src] PR #23643: Zend: inline some Closure handling
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-38417@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/23643 Author: Girgias The initial motivation was to actually *remove* the get_closure object handler as I couldn't find any usage via SourceGraph (which is quite difficult as get_closure is incredibly common) and the one usage I could was the old [Pimple extension](https://github.com/silexphp/Pimple/pull/231) and thus effectively revert https://github.com/php/php-src/commit/f90255c66b8d276d86e61a5d467371fa5ea6c926 But it turns out that ext/ffi uses it for ZEND_FFI_TYPE_FUNC CData classes (which once again reminds me we should try and actually provide different distinct classes for all those CData types rather than changing object handlers...) Anyway I've readded the zend_get_closure() API which inlines the Closure and __invoke() behaviour and abstracts over the get_closure object handler logic, and reordered some logic with the new API usage.

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