SG>><?php SG>> $fp1 = fopen('test', 'w'); SG>> $fp2 = $fp1; /* Still a single zval* and le->refcount == 1 */ SG>> $fp3 = &$fp1; /* Two zval*s now and le->refcount == 2 */ SG>> SG>> fclose($fp1);
I think this was discussed before, though I may be mistaken. The problem here is that you expect fclose to kill the resource, however $fp2 still refers it. Looks like there should be two operations for resource - one is usual delref called when variable is destroyed and second is "hard kill" called when something like fclose is used and invalidating all referring variables. I remember there were some issues with that, but I can't rememebr what they were... -- Stanislav Malyshev, Zend Products Engineer [EMAIL PROTECTED] http://www.zend.com/ +972-3-6139665 ext.115 -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php