note 71108 added to function.unset
| From: | leon dot pegg at gmail dot com | Date: | Sun, 12 Nov 2006 22:37:25 +0000 |
| Subject: | note 71108 added to function.unset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-119639@lists.php.net to get a copy of this message | ||
This may not be the most conveniant method of object self destruction in php5 but i works see
example
class test{
private $self;
public function __construct(&$self){
$this->self = &$self;
}
public function destroy(){
$this->self = null;
}
}
$new = new test($new);
print_r($new);
$new->destroy();
print_r($new);
hope this helps someone
----
Server IP: 85.116.0.130
Probable Submitter: 87.74.10.72
----
Manual Page -- http://www.php.net/manual/en/function.unset.php
Edit -- https://master.php.net/note/edit/71108
Del: integrated -- https://master.php.net/note/delete/71108/integrated
Del: useless -- https://master.php.net/note/delete/71108/useless
Del: bad code -- https://master.php.net/note/delete/71108/bad+code
Del: spam -- https://master.php.net/note/delete/71108/spam
Del: non-english -- https://master.php.net/note/delete/71108/non-english
Del: in docs -- https://master.php.net/note/delete/71108/in+docs
Del: other reasons-- https://master.php.net/note/delete/71108
Reject -- https://master.php.net/note/reject/71108
Search -- https://master.php.net/manage/user-notes.php