#35226 [Opn->Bgs]: __destruct of a class that extends ffi not called

From: Date: Tue, 15 Nov 2005 11:50:08 +0000
Subject: #35226 [Opn->Bgs]: __destruct of a class that extends ffi not called
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-88200@lists.php.net to get a copy of this message
ID: 35226 Updated by: tony2001@php.net Reported By: ken at nightmail dot ru -Status: Open +Status: Bogus -Bug Type: Scripting Engine problem +Bug Type: Unknown/Other Function Operating System: windows xp sp2 PHP Version: 5.0.5 New Comment: Please report PECL related issues to the PECL bug system. Previous Comments: ------------------------------------------------------------------------ [2005-11-15 12:46:54] 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=35226&edit=1

« previous php.bugs (#88200) next »