|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-09-23 20:27 UTC] helly@php.net
[2011-05-24 13:31 UTC] pinaki17 at gmail dot com
[2011-05-25 13:10 UTC] olafurw at gmail dot com
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 01:00:01 2025 UTC |
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: /