Bug #60497 [Opn->Nab]: PHP Destructor not called after object save
| From: | mike@php.net | Date: | Fri, 06 Dec 2013 07:36:43 +0000 |
| Subject: | Bug #60497 [Opn->Nab]: PHP Destructor not called after object save | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-183170@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60497&edit=1
ID: 60497
Updated by: mike@php.net
Reported by: mat999 at gmail dot com
Summary: PHP Destructor not called after object save
-Status: Open
+Status: Not a bug
Type: Bug
Package: *General Issues
Operating System: Ubuntu
PHP Version: 5.3.8
Block user comment: N
Private report: N
New Comment:
.
Previous Comments:
------------------------------------------------------------------------
[2011-12-12 03:33:38] mat999 at gmail dot com
Description:
------------
After saving an object in __destruct, __destruct is not called again.
Test script:
---------------
class ClassSave {
function __destruct(){
global $test;
$test = $this;
echo "Destruct\r\n";
}
}
echo "1: ";
new ClassSave();
echo "2: ";
$test = null;
unset($test);
echo "End\r\n";
Expected result:
----------------
1: Destruct
2: Destruct
End
Actual result:
--------------
1: Destruct
2: End
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60497&edit=1