Results 1 to 13 of 13
Jun 9, 2005, 10:40 #1
- Join Date
- Dec 2004
- ljubljana, slovenia
- 0 Post(s)
- 0 Thread(s)
__destruct and shutdown functions not working
Ok, here is the problem.
I have a server with PHP 5.0.3, running on 2.6.11-gentoo, let's call it server A, and another one with 5.0.4, running on 2.6.10-gentoo-r2, server B.
Here is the code that I run on both:
// set error displaying to full
error_reporting(E_ALL | E_STRICT);
echo "OnShutdown function called.\n";
// register this function to be run at script shutdown
// define a class with a destructor
// taken from php.net example for __destruct
print "In constructor\n";
$this->name = "MyDestructableClass";
print "Destroying " . $this->name . "\n";
// create a class
$obj = new MyDestructableClass();
In constructor OnShutdown function called. Destroying MyDestructableClass
The thing is driving me crazy, specially because some of my new code is using some sort of automated database features with objects inserting/updating/deleting on destruction and I really need this to work.