[php-src] Issue #22118: unregister_tick_function: First-class callable syntax fails to unregister on PHP 8.5

[email protected] (solverat) Fri, 22 May 2026 06:56:02 +0000
Newsgroups php.bugs
Message-ID <[email protected]>
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_