xref: /PHP-7.4/ext/opcache/tests/fe_fetch_dce.phpt (revision 87691e74)
1--TEST--
2Incorrect DCE with FE_FETCH
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7--FILE--
8<?php
9
10function test() {
11    $a = ["3"];
12    $x = 1;
13    foreach ($a as $x) {
14        $x = 2.0;
15    }
16    var_dump($x);
17}
18test();
19
20?>
21--EXPECT--
22float(2)
23