[php-src] PR #22145: Fix GH-22118: Unregister equivalent tick closures

From: Date: Mon, 25 May 2026 08:25:27 +0000
Subject: [php-src] PR #22145: Fix GH-22118: Unregister equivalent tick closures
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-36231@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/22145 Author: prateekbhujel When tick callbacks are registered with first-class method callable syntax, a fresh fake Closure is created for each $this->kick(...) expression. The current PHP-8.5 tick callback comparison uses zend_fcc_equals(), so unregister_tick_function() compares the Closure object by identity and misses an equivalent callback. Keep the fast FCC comparison, but fall back to Closure object comparison for Closure-backed callables. This restores the pre-8.5 behavior for equivalent fake closures while preserving the re-entrant unregister guard. Fixes GH-22118. Tests: - sapi/cli/php run-tests.php -q -p sapi/cli/php ext/standard/tests/general_functions/gh22118.phpt ext/standard/tests/general_functions/bug66094.phpt ext/standard/tests/general_functions/tick_function_with_trampoline.phpt

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