dis-bench / src /php /php-src /sapi /phpdbg /tests /generator_run.phpt
meddyrat's picture
Replace repository contents with the original corrected artifact
1e94262
Raw History Blame Contribute Delete
339 Bytes
--TEST--
Ensure proper saving of EX(opline)
--PHPDBG--
r
q
--EXPECTF--
[Successful compilation of %s]
prompt> caught Generator exception
[Script ended normally]
prompt>
--FILE--
<?php
function gen() {
try {
throw new Exception;
} catch(Exception $e) {
yield "caught Generator exception";
}
}
foreach (gen() as $v) {
print $v;
}