I'm wondering if it's a bug to give automatically called destructors access to constants (PHP Version 5.0.0b1). I'd expect to be neither able to access global variables nor constants after script termination (die()).
Ulf
$dtor = 'global $dtor variable is visible'; define('DTOR', 'DTOR constant is visible');
class dtor {
function __destruct() { global $dtor; printf('$dtor = "%s"<br> DTOR = "%s"<br>', $dtor, DTOR); } }
$d1 = new dtor(); unset($d1);
$d2 = new dtor(); die();
generated output:
$dtor = "global $dtor variable is visible" DTOR = "DTOR constant is visible" $dtor = "" DTOR = "DTOR constant is visible"
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php