Re: static constructor
| From: | Crypto Compress | Date: | Fri, 13 Mar 2015 06:45:39 +0000 |
| Subject: | Re: static constructor | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-84663@lists.php.net to get a copy of this message | ||
Hello Johannes,
in other mails you argue with Rowan about global state. I think it's better to focus on innovation of "class context" in global scope, as it's impossible to reason the disadvantages of global state away. (Discussions on variable scope are painful too.)
And two questions:
1. By definition cctor is guaranteed to be executed only once. Right?
2. In your examples you employ some external resources in cctor (e.g. logger, db, ini-files). Do you intend to propose a cdtor to release this resources?
Thank you!