xref: /PHP-7.1/Zend/tests/bug74840.phpt (revision e3cc15da)
1--TEST--
2Bug #74840: Opcache overwrites argument of GENERATOR_RETURN within finally
3--FILE--
4<?php
5
6$g = (function($a) {
7	try {
8		return $a + 1;
9	} finally {
10		$b = $a + 2;
11		var_dump($b);
12	}
13	yield; // Generator
14})(1);
15$g->next();
16var_dump($g->getReturn());
17
18?>
19--EXPECT--
20int(3)
21int(2)
22