diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2017-07-01 11:52:41 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2017-07-01 11:52:41 +0200 |
commit | af7bfc71fd8ac2c2a4135b7805370fae2b08533f (patch) | |
tree | f5e0d09aa2a07811f173f608d7d82ca19a449e20 /Zend | |
parent | 72f71432954f4ddca9e4df0b3951eacabe73c2bb (diff) | |
parent | e3cc15daf2abc1b4886d4888c3bf5ca9cef035c8 (diff) | |
download | php-git-af7bfc71fd8ac2c2a4135b7805370fae2b08533f.tar.gz |
Merge branch 'PHP-7.0' into PHP-7.1
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/tests/bug74840.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Zend/tests/bug74840.phpt b/Zend/tests/bug74840.phpt new file mode 100644 index 0000000000..68e27cba84 --- /dev/null +++ b/Zend/tests/bug74840.phpt @@ -0,0 +1,21 @@ +--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) |