mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
24 lines
440 B
PHP
24 lines
440 B
PHP
--TEST--
|
|
Bug #62763 (register_shutdown_function and extending class)
|
|
--FILE--
|
|
<?php
|
|
class test1 {
|
|
public function __construct() {
|
|
register_shutdown_function(array($this, 'shutdown'));
|
|
}
|
|
public function shutdown() {
|
|
exit(__METHOD__);
|
|
}
|
|
}
|
|
|
|
class test2 extends test1 {
|
|
public function __destruct() {
|
|
exit (__METHOD__);
|
|
}
|
|
}
|
|
new test1;
|
|
new test2;
|
|
?>
|
|
--EXPECT--
|
|
test1::shutdowntest2::__destruct
|