1--TEST--
2Type inference 022: FETCH_DIM_W
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.optimization_level=-1
7--FILE--
8<?php
9function &foo(&$a, $n) {
10    foreach (array(0) as $_) {
11        return $a[$n];
12    }
13}
14?>
15DONE
16--EXPECT--
17DONE
18