1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 07:58:20 +02:00
Files
archived-php-src/tests/classes/destructor_visibility_001.phpt
T
2020-02-03 22:52:20 +01:00

26 lines
442 B
PHP

--TEST--
ZE2 Ensuring destructor visibility
--FILE--
<?php
class Base {
private function __destruct() {
echo __METHOD__ . "\n";
}
}
class Derived extends Base {
}
$obj = new Derived;
unset($obj);
?>
===DONE===
--EXPECTF--
Fatal error: Uncaught Error: Call to private Derived::__destruct() from context '' in %sdestructor_visibility_001.php:%d
Stack trace:
#0 {main}
thrown in %sdestructor_visibility_001.php on line %d