mirror of
https://github.com/php/php-src.git
synced 2025-01-14 06:54:52 +08:00
25 lines
339 B
PHP
25 lines
339 B
PHP
--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;
|
|
}
|