bug62763.phpt 436 B

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