blob: 0ead4501afbe38e5bd7108aac26602cefbb2a700 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
--TEST--
try { yield } finally { throw }
--FILE--
<?php
function foo($f, $t) {
for ($i = $f; $i <= $t; $i++) {
try {
yield $i;
} finally {
throw new Exception;
}
}
}
foreach (foo(1, 5) as $x) {
echo $x, "\n";
}
--EXPECTF--
1
Fatal error: Uncaught exception 'Exception' in %s:%d
Stack trace:
#0 %s(%d): foo(1, 5)
#1 {main}
thrown in %s on line %d
|