Re: New destructors implementation
| From: | Stephane Drouard | Date: | Mon, 09 Feb 2004 13:36:27 +0000 |
| Subject: | Re: New destructors implementation | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-7660@lists.php.net to get a copy of this message | ||
== Quote from Zeev Suraski (zeev@zend.com)'s article
> They're not locked to 1, and nothing in a symbol table will ever be with a
> refcount of less than 1... But generally, all global variables (or for
> that matter, all variables period) have a refcount of 1, unless you do
> something 'special'.
Right. So if a global variable "father" owns a reference to another global variable
"child", I assume "child"'s refcount is higher than
"father"'s one, let's say 2 for "child" ($GLOBALS +
"father") and 1 for "father" ($GLOBALS), assuming they are not referenced
elsewhere.
So why PHP can't guaranty that "father"'s destructor is called before
"child"'s one?
Stephane