mirror of
https://github.com/php/php-src.git
synced 2024-12-13 20:05:26 +08:00
22 lines
288 B
PHP
22 lines
288 B
PHP
--TEST--
|
|
Bug #74840: Opcache overwrites argument of GENERATOR_RETURN within finally
|
|
--FILE--
|
|
<?php
|
|
|
|
$g = (function($a) {
|
|
try {
|
|
return $a + 1;
|
|
} finally {
|
|
$b = $a + 2;
|
|
var_dump($b);
|
|
}
|
|
yield; // Generator
|
|
})(1);
|
|
$g->next();
|
|
var_dump($g->getReturn());
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(3)
|
|
int(2)
|