Edit report at http://bugs.php.net/bug.php?id=52479&edit=1
ID: 52479 Updated by: johan...@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