xref: /PHP-7.3/Zend/tests/bug62763.phpt (revision 782352c5)
1--TEST--
2Bug #62763 (register_shutdown_function and extending class)
3--FILE--
4<?php
5class test1 {
6    public function __construct() {
7        register_shutdown_function(array($this, 'shutdown'));
8    }
9    public function shutdown() {
10        exit(__METHOD__);
11    }
12}
13
14class test2 extends test1 {
15    public function __destruct() {
16       exit (__METHOD__);
17    }
18}
19new test1;
20new test2;
21?>
22--EXPECT--
23test1::shutdowntest2::__destruct
24