Re: destructor access to constants
| From: | Ulf Wendel | Date: | Sun, 06 Jul 2003 12:46:13 +0000 |
| Subject: | Re: destructor access to constants | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-3274@lists.php.net to get a copy of this message | ||
Marcus Börger wrote:
Global variables are a bit complicated but constants are either bound to the class so they are obviously available in instance destruction or as in your case they were registered in the global space and hence destructed after all script action is finished which includes automatic destructor calls from GC.Hi Markus, is the this behaviour a feature or a bug? With other words can I rely on the following: ... $__die = false; die() ... function __destruct() { global $__die_called; if (isset($__die))
// script is still running
print "... unless someone has unset $__die.";
else
// script has ended
print "that's it folks!";
}
Ulf