summaryrefslogtreecommitdiff
path: root/tests/classes/destructor_inheritance.phpt
blob: c527c04b4fc1e9fa1f8726665fc6602d2611807e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--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