Bug #52479 [Opn->Bgs]: Object destructor does not get called on fatal error

From: Date: Fri, 06 Aug 2010 23:59:55 +0000
Subject: Bug #52479 [Opn->Bgs]: Object destructor does not get called on fatal error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-153199@lists.php.net to get a copy of this message
Edit report at http://bugs.php.net/bug.php?id=52479&edit=1

 ID:                 52479
 Updated by:         johannes@php.net
 Reported by:        php-bugs at majkl578 dot cz
 Summary:            Object destructor does not get called on fatal error
-Status:             Open
+Status:             Bogus
 Type:               Bug
 Package:            Scripting Engine problem
 Operating System:   Linux Debian
 PHP Version:        5.3.3
 Block user comment: N

 New Comment:

Fatal Errors keep the engine in undefined state we can't rely on the
availability of the destructor anymore.


Previous Comments:
------------------------------------------------------------------------
[2010-07-29 03:11:45] php-bugs at majkl578 dot cz

Description:
------------
Class destructor does not get called when the script end with fatal
error (eg. unknown function, uncaught exception etc.).

Test script:
---------------
class Foo {
	function __destruct() {
		touch('/tmp/foo');
	}
}

$x = new Foo;

throw new Exception;

Expected result:
----------------
New file /tmp/foo

Actual result:
--------------
Nothing


------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52479&edit=1


Thread (2 messages)

« previous php.bugs (#153199) next »