#35226 [NEW]: __destruct of a class that extends ffi not called
| From: | ken at nightmail dot ru | Date: | Tue, 15 Nov 2005 11:46:56 +0000 |
| Subject: | #35226 [NEW]: __destruct of a class that extends ffi not called | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-88199@lists.php.net to get a copy of this message | ||
From: ken at nightmail dot ru
Operating system: windows xp sp2
PHP version: 5.0.5
PHP Bug Type: Scripting Engine problem
Bug description: __destruct of a class that extends ffi not called
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 bug report at http://bugs.php.net/?id=35226&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=35226&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=35226&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=35226&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=35226&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35226&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35226&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35226&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35226&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35226&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35226&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35226&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35226&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35226&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35226&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35226&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35226&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35226&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35226&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35226&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35226&r=mysqlcfg