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?

class xmysql {

 var $id;


 function xmysql() {
  $id =  mysql_connect(localhost,'mystic','cqr73chw');
   or die("Could not connect to MYSQL database");
 function ~xmysql() {
 function GetID() {
  return $id;
} // end xmysql

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to