bug69737.phpt 554 B

123456789101112131415161718192021
  1. --TEST--
  2. Bug #69737 (Segfault when SplMinHeap::compare produces fatal error)
  3. --FILE--
  4. <?php
  5. class SplMinHeap1 extends SplMinHeap {
  6. public function compare($a, $b): int {
  7. return -parent::notexist($a, $b);
  8. }
  9. }
  10. $h = new SplMinHeap1();
  11. $h->insert(1);
  12. $h->insert(6);
  13. ?>
  14. ===DONE===
  15. --EXPECTF--
  16. Fatal error: Uncaught Error: Call to undefined method SplMinHeap::notexist() in %s%ebug69737.php:%d
  17. Stack trace:
  18. #0 [internal function]: SplMinHeap1->compare(1, 6)
  19. #1 %s%ebug69737.php(%d): SplHeap->insert(6)
  20. #2 {main}
  21. thrown in %s%ebug69737.php on line %d