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}
14
15$obj = new Derived;
16
17unset($obj);
18
19?>
20===DONE===
21--EXPECTF--
22Fatal error: Uncaught Error: Call to private Derived::__destruct() from global scope in %s:%d
23Stack trace:
24#0 {main}
25  thrown in %sdestructor_visibility_001.php on line %d
26