note 106776 deleted from language.oop5.decon by levim
| From: | levim@php.net | Date: | Tue, 18 Mar 2014 02:09:00 +0000 |
| Subject: | note 106776 deleted from language.oop5.decon by levim | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-198917@lists.php.net to get a copy of this message | ||
Note Submitter: kapsonfire at gmx dot de
----
If you use __destruct in your script manually it's not automatically unset the $vars inside the
the script.
For that you can use following script to clean up the class.
<?php
public function __destruct() {
foreach ($this as $key => $value) {
unset($this->$key);
}
}
?>