Re: static constructor
| From: | Rowan Collins | Date: | Thu, 12 Mar 2015 00:10:15 +0000 |
| Subject: | Re: static constructor | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-84605@lists.php.net to get a copy of this message | ||
On 11/03/2015 23:21, Johannes Ott wrote:
So now I want to do my first own proposal for a new function in PHP and I hope doing it right with starting a discussion here first. The purpose of this suggestion is to introduce a static constructor, which is called before the first call to class either static or non-static to initialize some static properties which are needed by the class.Can you give an example use case for when this would be useful? I'm struggling to think of one for which there isn't already an established coding pattern... Regards, -- Rowan Collins [IMSoP]