Re: delete in PHP
| From: | Florian Schaper | Date: | Tue, 01 Jun 2004 14:50:55 +0000 |
| Subject: | Re: delete in PHP | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-10214@lists.php.net to get a copy of this message | ||
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 worth committing.
>
> unset($obj) works just fine too.
>
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 if you have an
garbage collector but I can think about a few uses.
./regards
Florian