I am not familiar with the term: "zval"...My understanding of php comes from extensive usage...Can you give me a specific example?
OK, sorry, got a bit into engine-speak, basically zval is the internal representation of a variable, more or less, though $foo and $bar can be linked to the same zval, and may be linked to different ones, depending on the context. The objects have its won refcounts internally, which means two unrelated variables can point to the same object. For these variables, both refcounts would be 1, but if you destroy any variable, object won't be destroyed since there's another variable pointing to it and the object knows that. So checking just refcount of the variable is not enough, since low refcount doesn't mean there's no variables referring to the object, only there's no "related" variables. If you want to dive into this in detail, I think the links recommended by Arnold Daniels would be a good start, especially in part talking about references and copies.
I also believe that my reasons for this feature only require that there are not any less references than are returned by ref_count()...I am
ref_count() can return small number and there can still be references to this object - just from another variable. So to be sure you would have basically to inspect both refcounts - variable's and object's.
-- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php