Re: Re[2]: [PHP-DEV] Weak references in PHP

2003-02-28 Thread J Smith

ZE2 == Zend Engine 2, which will be replacing the current Zend Engine in PHP
5. Amoung other things, one of it's main features is a more roboust OOP
framework, which includes class destructors.

J


Konstantin Knizhnik wrote:

> Hello George,
> 
> Friday, February 28, 2003, 5:46:18 PM, you wrote:
> 
>>> Can anybody tell me if such features are available in PHP (I failed to
>>> find
>>> them myself).
> 
> GS> Look at __destruct method for classes in ZE2.  They wopn't tell you
> the GS> reference count, but the do get called when the ref count goes to
> 0.
> 
> 
> Sorry, I am dummy in PHP world:( Can you explain more precisely what
> is ZE2 and where should I look for __destruct method.
> I didn't find any reference to such method neither in PHP manual
> neither in PHP sources i have downloaded.
> 


-- 
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php



Re: Re[2]: [PHP-DEV] Weak references in PHP

2003-02-28 Thread George Schlossnagle
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.

--
PHP Development Mailing List 
To unsubscribe, visit: http://www.php.net/unsub.php