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


-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to