ID: 30210 Updated by: [EMAIL PROTECTED] Reported By: m dot leuffen at i-line dot net -Status: Open +Status: Bogus Bug Type: Directory function related Operating System: Linux PHP Version: 5.0.1 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php The destructor is called during shutdown. If you require certain behavior the unset() your object before the script terminates. Previous Comments: ------------------------------------------------------------------------ [2004-09-23 16:31:11] m dot leuffen at i-line dot net Description: ------------ Hi. In __destruct() function the working-directory is default set to root ('/'). Bye, Matthias Reproduce code: --------------- class Test { public function __construct() { echo "Constructor: ".getcwd(); } public function __destruct() { echo "\nDestructor: ".getcwd(); } } $obj = new Test(); Expected result: ---------------- Constructor: /home/xyz/dir Destructor: /home/xyz/dir Actual result: -------------- Constructor: /home/xyz/dir Destructor: / ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30210&edit=1
