Question about __destruct()
| From: | Dan Joseph | Date: | Tue, 21 Oct 2008 20:00:40 +0000 |
| Subject: | Question about __destruct() | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-282214@lists.php.net to get a copy of this message | ||
Hi,
I want to make sure I completely understand __destruct() and when its hit...
Understand that it will run if all references to a particular object are
removed, but is that also true when a page ends its execution?
Example, I call a database class. It constructs, connects, then my page
pulls some stuff out of the database, and then the php script ends. Does
this also cause the deconstruct to execute?
--
-Dan Joseph
www.canishosting.com - Plans start @ $1.99/month.
"Build a man a fire, and he will be warm for the rest of the day.
Light a man on fire, and will be warm for the rest of his life."