mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
22 lines
350 B
PHP
22 lines
350 B
PHP
--TEST--
|
|
ZE2 Ensuring destructor visibility
|
|
--FILE--
|
|
<?php
|
|
|
|
class Base {
|
|
private function __destruct() {
|
|
echo __METHOD__ . "\n";
|
|
}
|
|
}
|
|
|
|
class Derived extends Base {
|
|
}
|
|
|
|
$obj = new Derived;
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
===DONE===
|
|
|
|
Warning: Call to private Derived::__destruct() from global scope during shutdown ignored in Unknown on line 0
|