Re: register_shutdown_function

From: Date: Mon, 15 Apr 2002 17:15:47 +0000
Subject: Re: register_shutdown_function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-93045@lists.php.net to get a copy of this message
On Sunday, April 14, 2002, at 07:23 PM, Hayden Kirk wrote:
im trying to make a distructor for a mysql class to kill the connection when the object is destroyed using register_shutdown_function("~xmysql"); if i put that in my class will it do that or am i getting confused. ~xmysql is a destructor function i made. Heres the code, will it work how i want it to?
I did not think that PHP had support for destructor methods. You could call your "xmysql" method manually if you like but you can't have it called automatically if your object is unset(). This is according to: http://www.php.net/manual/en/language.oop.constructor.php , down at the bottom just before the annotations. Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.com

« previous php.general (#93045) next »