1--TEST--
2ZE2 Ensuring destructor visibility
3--FILE--
4<?php
5
6class Base {
7    private function __destruct() {
8        echo __METHOD__ . "\n";
9    }
10}
11
12class Derived extends Base {
13    public function __destruct() {
14        echo __METHOD__ . "\n";
15    }
16}
17
18$obj = new Derived;
19
20unset($obj); // Derived::__destruct is being called not Base::__destruct
21
22?>
23--EXPECT--
24Derived::__destruct
25