[php-src] Issue #23196: Static property hooks
| From: | procodix | Date: | Mon, 10 Aug 2026 10:14:05 +0000 |
| Subject: | [php-src] Issue #23196: Static property hooks | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-252587@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/23196
Author: procodix
### Description
Has anyone ever asked for property hooks on static properties? Or, more importantly: has anyone
actually gone through the trouble of writing an RFC for it?
The current Property Hooks RFC explicitly excludes static properties. I was wondering whether this
is simply a limitation that has never been addressed, or whether there are good reasons why static
property hooks should not exist.
For example:
```php
class Foo
{
public static string $bar {
get => ...;
set => ...;
}
}
```
If there is interest, I would be happy to take on the work of writing the RFC.