Skip to content

Commit 93fb1f6

Browse files
committed
Add another test case
1 parent 9854f20 commit 93fb1f6

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
--TEST--
2+
GH-21264: Missing reference unwrap for FE_FETCH_R in JIT
3+
--EXTENSIONS--
4+
opcache
5+
--INI--
6+
opcache.enable=1
7+
opcache.enable_cli=1
8+
opcache.jit=tracing
9+
--FILE--
10+
<?php
11+
12+
class C {
13+
public $prop = 0;
14+
}
15+
16+
function test($array) {
17+
$c = new C;
18+
foreach ($array as $c->prop) {
19+
$c->prop++;
20+
}
21+
}
22+
23+
$element = 0;
24+
$array = [&$element, &$element];
25+
test($array);
26+
test($array);
27+
var_dump($element);
28+
29+
?>
30+
--EXPECT--
31+
int(0)

0 commit comments

Comments
 (0)