bug69599.phpt 372 B

123456789101112131415161718192021
  1. --TEST--
  2. Bug #69599: Strange generator+exception+variadic crash
  3. --FILE--
  4. <?php
  5. function crash() {
  6. sin(...[0]);
  7. throw new \Exception();
  8. yield;
  9. }
  10. iterator_to_array(crash());
  11. ?>
  12. --EXPECTF--
  13. Fatal error: Uncaught Exception in %s:%d
  14. Stack trace:
  15. #0 [internal function]: crash()
  16. #1 %s(%d): iterator_to_array(Object(Generator))
  17. #2 {main}
  18. thrown in %s on line %d