Re: [PHP-DEV] delete in PHP

2004-06-01 Thread Derick Rethans
On Tue, 1 Jun 2004, Ferdinand Beyer wrote: > On 1 Jun 2004 at 16:50, Florian Schaper wrote: > > > My version of delete works like the delete we know from C++. The > > object's destructor and the object is then released immediately. All > > references of this object are set to IS_NULL. > > > > Some

Re: [PHP-DEV] delete in PHP

2004-06-01 Thread Adam Bregenzer
On Tue, 2004-06-01 at 19:45, Florian Schaper wrote: > For completeness: > Proposed behaviour of delete as opposed to unset: > $ php-dev -r 'class Object { function __destruct() { echo > "Destroyed\n"; }} $o= new Object(); $o2= &$o; delete $o; var_export( $o ); > var_export( $o2 ); echo > "Shutti

Re: [PHP-DEV] delete in PHP

2004-06-01 Thread Florian Schaper
Timm Friebe wrote: [...] > In comparison to the proposed "delete", unset() only decreases the > refcount. > > Have a look at the following examples: > > $ php-dev -r 'class Object { function __destruct() { echo > "Destroyed\n"; }} $o= new Object(); unset($o); echo "Shutting > down\n";' > Destroyed

Re: [PHP-DEV] delete in PHP

2004-06-01 Thread Timm Friebe
On Tue, 2004-06-01 at 16:50, Florian Schaper wrote: > Derick Rethans wrote: > > On Tue, 1 Jun 2004, Florian Schaper wrote: > > > >> An Zend API 2.0 paper I read a while ago said something about > >> "delete" being implemented in PHP5. > >> However, no delete. > >> > >> Was this feature dropped? I h

Re: [PHP-DEV] delete in PHP

2004-06-01 Thread Ferdinand Beyer
On 1 Jun 2004 at 16:50, Florian Schaper wrote: > My version of delete works like the delete we know from C++. The object's > destructor and the object is then released immediately. All references of > this object are set to IS_NULL. > > Some might argue that this is a feature not worth having i

Re: [PHP-DEV] delete in PHP

2004-06-01 Thread Florian Schaper
Derick Rethans wrote: > On Tue, 1 Jun 2004, Florian Schaper wrote: > >> An Zend API 2.0 paper I read a while ago said something about >> "delete" being implemented in PHP5. >> However, no delete. >> >> Was this feature dropped? I have implemented delete for myself now >> and was wondering if it was

Re: [PHP-DEV] delete in PHP

2004-06-01 Thread Derick Rethans
On Tue, 1 Jun 2004, Florian Schaper wrote: > An Zend API 2.0 paper I read a while ago said something about "delete" being > implemented in PHP5. > However, no delete. > > Was this feature dropped? I have implemented delete for myself now and was > wondering if it was worth committing. unset($obj)

[PHP-DEV] delete in PHP

2004-06-01 Thread Florian Schaper
An Zend API 2.0 paper I read a while ago said something about "delete" being implemented in PHP5. However, no delete. Was this feature dropped? I have implemented delete for myself now and was wondering if it was worth committing. ./regards Florian -- PHP Internals - PHP Runtime Development Ma