Hello everybody. I found myself wanting this feature (that I first encountered when programming in C#) for removing a workaround from a codebase I work from time to time. I searched internals and found a discussion from almost a decade ago. That discussion did not end well, mostly because of insulting accusations. I then decided to do some research on this subject and found out that it's a pretty common feature in other OOP languages. Also, as I started studying the php-src (and missed the days when I used to program in C in my main job), I decided to do an implementation myself even before presenting the RFC. The implementation link can also be found at the RFC.
You can read the RFC here: https://wiki.php.net/rfc/static_constructor Regards, Erick