mirror of
https://github.com/php/php-src.git
synced 2024-12-13 03:44:17 +08:00
29 lines
449 B
PHP
Executable File
29 lines
449 B
PHP
Executable File
--TEST--
|
|
ZE2 The inherited destructor is called
|
|
--SKIPIF--
|
|
<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?>
|
|
--FILE--
|
|
<?php
|
|
class base {
|
|
function __construct() {
|
|
echo __METHOD__ . "\n";
|
|
}
|
|
|
|
function __destruct() {
|
|
echo __METHOD__ . "\n";
|
|
}
|
|
}
|
|
|
|
class derived extends base {
|
|
}
|
|
|
|
$obj = new derived;
|
|
|
|
unset($obj);
|
|
|
|
echo 'Done';
|
|
?>
|
|
--EXPECT--
|
|
base::__construct
|
|
base::__destruct
|
|
Done
|