summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/fe_fetch_dce.phpt
blob: f7ff0203d786c34620747a1d3963524f0feab368 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
Incorrect DCE with FE_FETCH
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.optimization_level=-1
--FILE--
<?php

function test() {
    $a = ["3"];
    $x = 1;
    foreach ($a as $x) {
        $x = 2.0;
    }
    var_dump($x);
}
test();

?>
--EXPECT--
float(2)