php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35226 __destruct of a class that extends ffi not called
Submitted: 2005-11-15 12:46 UTC Modified: 2005-11-15 12:50 UTC
From: ken at nightmail dot ru Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.0.5 OS: windows xp sp2
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ken at nightmail dot ru
New email:
PHP Version: OS:

 

 [2005-11-15 12:46 UTC] ken at nightmail dot ru
Description:
------------
It's a bag like 28840, but with class ffi.
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;
unset($test);

?>


Expected result:
----------------
born
died


Actual result:
--------------
born

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-15 12:50 UTC] tony2001@php.net
Please report PECL related issues to the PECL bug system.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 12 13:01:33 2025 UTC