Am 13.04.2015 um 18:54 schrieb Johannes Schlüter: > On Mon, 2015-04-13 at 17:23 +0200, Johannes Schlüter wrote: >> Why am I saying it makes the language more complex? - Your proposal >> seems to miss mentioning when exactly the method is executed. what is > > Ah, I missed this > > Trigger for “magic” method call: First call to class, either > first call to __construct(...) or first call to any public or > protected static method or property of the class > > Which means adding a flag, which has to be checked on every method call > or other access to *any* class and leads to completely "random" (from > perspective of average user) behavior while this feature can't be used > for an "obvious" task like registering itself as plugin into some > registry. > > -1 > > johannes >
The obvious task is to initial the state of the class before usage as I wrote inside my introduction of the RFC. I think there is no "random" behavior (not more then other so called "magic" methods). But I see that I forgot this point in the discussion part because we already had this point on the prediscussion. Will add this tomorrow, with my exact answer to this point, Thanks for reminder. https://wiki.php.net/rfc/static_class_constructor -- DerOetzi -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php