php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35197 Destructor not called
Submitted: 2005-11-11 21:59 UTC Modified: 2005-11-14 23:00 UTC
From: xmlfrance at gmail dot com Assigned: tony2001 (profile)
Status: Closed Package: DOM XML related
PHP Version: 5.0.5 and 5.1.0RC5-dev OS: Debian GNU/Linux SID
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: xmlfrance at gmail dot com
New email:
PHP Version: OS:

 

 [2005-11-11 21:59 UTC] xmlfrance at gmail dot com
Description:
------------
My classes extending DOMDocument don't call the destructor.

Reproduce code:
---------------
<?php

class Foo extends DOMDocument {
     function __construct() {
          print('Construction');
     }
     function __destruct() {
          print('Destruction');
     }
}

$o = new Foo;
/* I've also tried unset($o) */

?>


Expected result:
----------------
ConstructionDestruction

Actual result:
--------------
Construction

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-11 22:02 UTC] tony2001@php.net
Christian, please have a look at it.
 [2005-11-12 09:41 UTC] tony2001@php.net
Reassigned to myself.
I'll commit the patch (http://tony2001.phpclub.net/dev/tmp/bug35197.diff) after the release.
 [2005-11-12 11:34 UTC] xmlfrance at gmail dot com
Is there a correction for PHP 5.0.x ?
I must specify minimal configuration to use my framework.
 [2005-11-14 23:00 UTC] tony2001@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Fixed in PHP 6, PHP 5.1 & PHP 5.0.6.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Wed Aug 10 17:05:45 2022 UTC