note 106776 modified in language.oop5.decon by danbrown

From: Date: Tue, 06 Dec 2011 18:36:16 +0000
Subject: note 106776 modified in language.oop5.decon by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-184943@lists.php.net to get a copy of this message
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); } } ?> --was-- 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. public function __destruct() { foreach ($this as $key => $value) { unset($this->$key); } } http://php.net/manual/en/language.oop5.decon.php

« previous php.notes (#184943) next »