[php-src] Issue #23196: Static property hooks
[email protected] (procodix)
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <JYKggo4CsBEe4tbqhaBtgq8CbwqfusH0Gqyhjsqf2P8@main.internal.php.net> |
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.