note 44541 added to function.mssql-connect
| From: | nxfatsourceforgetdotnet at osu1 dot php dot net | Date: | Mon, 09 Aug 2004 13:48:58 +0000 |
| Subject: | note 44541 added to function.mssql-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-74319@lists.php.net to get a copy of this message | ||
Just a quickie relating to making a function run as a destructor:
Make sure you run register_shutdown_function AFTER you've set any member variables from outside
the class. It seems to ignore them otherwise.
class Myclass {
var $myvar;
function Myclass()
{
...
}
function destructor()
{
...
}
function enable_destructor()
{
register_shutdown_function(array(&$this, "destructor"))
}
}
$obj = new Myclass();
and then call $obj->enable_destructor only after any variable setting has been done.
This was seen on win32 apache2.0.49/php4.3.6.
----
Manual Page -- http://www.php.net/manual/en/function.mssql-connect.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+44541
Delete -- http://master.php.net/manage/user-notes.php?action=delete+44541&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+44541&report=yes
Search -- http://master.php.net/manage/user-notes.php