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