[php-src] Issue #22118: unregister_tick_function: First-class callable syntax fails to unregister on PHP 8.5
| From: | solverat | Date: | Fri, 22 May 2026 06:56:02 +0000 |
| Subject: | [php-src] Issue #22118: unregister_tick_function: First-class callable syntax fails to unregister on PHP 8.5 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-252113@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/22118
Author: solverat
### Description
When using rector on one of our application, a closure registration changed from:
```php
register_tick_function([$this, 'kick'])
unregister_tick_function([$this, 'kick']);
```
to
```php
register_tick_function($this->kick(...));
unregister_tick_function($this->kick(...));
```
- Works on: PHP 8.4
- Fails on: PHP 8.5
Reproducable via this one: https://onlinephp.io/c/e6e79
The only internal change I found touching tick functions in 8.5 was php-src#18033, but that only
moved the timing of
php_deactivate_ticks() during shutdown and seems unrelated to this
issue.
If this is intentional, it should be documented in the UPGRADING file.
### PHP Version
```plain
PHP 8.5.6
```
### Operating System
_No response_