Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85787 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 75822 invoked from network); 13 Apr 2015 19:14:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Apr 2015 19:14:39 -0000 X-Host-Fingerprint: 93.193.71.58 p5DC1473A.dip0.t-ipconnect.de Received: from [93.193.71.58] ([93.193.71.58:10567] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 64/A4-41712-D951C255 for ; Mon, 13 Apr 2015 15:14:39 -0400 Message-ID: <64.A4.41712.D951C255@pb1.pair.com> To: internals@lists.php.net Date: Mon, 13 Apr 2015 21:14:33 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 References: <1428938604.3492.21.camel@kuechenschabe> <1428944075.3492.27.camel@kuechenschabe> In-Reply-To: <1428944075.3492.27.camel@kuechenschabe> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Posted-By: 93.193.71.58 Subject: Re: [PHP-DEV] New RFC draft "static class constructor" From: mail@deroetzi.de (Johannes Ott) 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