Bug #9091: the Contructor of a class is called after! the end of a script

From: Date: Sat, 03 Feb 2001 22:53:11 +0000
Subject: Bug #9091: the Contructor of a class is called after! the end of a script
Groups: php.dev 
Request: Send a blank email to php-dev+get-45689@lists.php.net to get a copy of this message
From: sauer1@big-web.de Operating system: Unix (Apache/1.3.14) PHP version: 3.0.16 PHP Bug Type: Other Bug description: the Contructor of a class is called after! the end of a script I builded a class and in the constructor of the class i made a entry in a Database. The entry contains among other values the actual time. Every time i call a script in whitch a instance of this class is made i get two entries in the database. I wondered why and added outputs to see when and how often the constructor is called. But in the script-output i saw that the contructor is called only one time. As i output the time() at the very end of my script i saw that the second entry was made after that time!! I thinkt in normal case that is not possible. I dont know if this is a bug, but i think this is not the normal behavior. On my own machine the same script produces only one entry in the database. Perhaps the constructor is called instead of the destructor.

« previous php.dev (#45689) next »