Re: Re[2]: [PHP-DEV] Weak references in PHP
[email protected] (George Schlossnagle)
| Newsgroups | php.dev |
|---|---|
| Message-ID | <[email protected]> |
> Using __destruct method (thanks to George) it may be possible to > implement > what I need, but only if object cache is implemented in C (and so is > not visible for PHP garbage collector). So no pure PHP solution exits. > Unfortunately I didn't fins any reference to __destruct method in PHP > manual and do not understand how it works. If I just declare > __destruct method in class, it is not invoked when object is > destructed. It's in ZE2 have a look at Zend/ZEND_CHANGES in the source tree for details (you'll need to be running php5/HEAD). And it's a userland method, so the cache can be implemented in PHP.