mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
27 lines
339 B
PHP
27 lines
339 B
PHP
--TEST--
|
|
ZE2 The inherited destructor is called
|
|
--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
|