|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56652 __destruct of a class that extends ffi not called
Submitted: 2005-11-15 06:58 UTC Modified: 2017-04-01 20:08 UTC
From: ken at nightmail dot ru Assigned:
Status: Wont fix Package: ffi (PECL)
PHP Version: Irrelevant OS: windows xp sp2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-11-15 06:58 UTC] ken at nightmail dot ru
Used PHP v5.0.5
When you create a class by extending ffi and add a
destructor to it, it doesn't get called when the object gets out of scope.

Reproduce code:

class test extends ffi
    function __construct( $param ){ parent::__construct($param); echo
"born\n"; }
    function __destruct() { parent::__destruct(); echo "died\n"; }

$test = new test;


Expected result:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-15 07:09 UTC] pierre dot php at gmail dot com
As a note, some exts have been fixed in cvs. But I was not sure if the fix is correct or not. Tony will check a 2nd time with Dmitri whether NULL means "the default destruct" or no desctruct.
 [2005-11-15 07:14 UTC] tony2001 at phpclub dot net
Wez, please check out the patch:
 [2013-12-13 07:52 UTC]
-Status: Assigned +Status: Open -Assigned To: wez +Assigned To:
 [2017-04-01 20:08 UTC]
-Status: Open +Status: Wont fix
 [2017-04-01 20:08 UTC]
Due to this extension not seeing any activity since 2004, this issue will not be fixed. We are therefore closing this now.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Mar 03 10:01:29 2024 UTC