ID: 41696 Updated by: [EMAIL PROTECTED] Reported By: irik at future-proof dot net -Status: Open +Status: Feedback Bug Type: Class/Object related Operating System: Linux (Slackware) 2.6.11.10 PHP Version: 5.2.3 New Comment:
Cannot reproduce. Previous Comments: ------------------------------------------------------------------------ [2007-06-15 06:28:05] irik at future-proof dot net Description: ------------ on linux (slackware) the __destruct method seems to be called twice, even before. On windows32 this behaviour is not seen. Perhaps I misunderstand the role of __destruct, but that would not explain why the behaviour differs between platforms. Reproduce code: --------------- $Test = new Test(); echo $Test->strtolower("foo bar") . "<br />"; class Test { public function __construct() { } public function __call($function, $arguments) { return call_user_func_array($function, $arguments); } public function __destruct() { echo "here i am<br />"; } } Expected result: ---------------- foo bar here i am Actual result: -------------- here i am foo bar here i am ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41696&edit=1