1--TEST--
2Ensure proper saving of EX(opline)
3--PHPDBG--
4r
5q
6--EXPECTF--
7[Successful compilation of %s]
8prompt> caught Generator exception
9[Script ended normally]
10prompt>
11--FILE--
12<?php
13
14function gen() {
15	try {
16		throw new Exception;
17	} catch(Exception $e) {
18		yield "caught Generator exception";
19	}
20}
21
22foreach (gen() as $v) {
23	print $v;
24}
25