1--TEST-- 2ZE2 Ensuring destructor visibility 3--SKIPIF-- 4<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> 5--FILE-- 6<?php 7 8class Base { 9 private function __destruct() { 10 echo __METHOD__ . "\n"; 11 } 12} 13 14class Derived extends Base { 15} 16 17$obj = new Derived; 18 19unset($obj); 20 21?> 22===DONE=== 23--EXPECTF-- 24Fatal error: Call to private Derived::__destruct() from context '' in %sdestructor_visibility_001.php on line %d 25