enable coroutine for rust emitter
[hiphop-php.git] / hphp / test / slow / array_iterator / 440.php
blobb38cbf0b7ac7ecd79486293d07a072fdeb13e6a0
1 <?hh
4 <<__EntryPoint>>
5 function main_440() {
6 $a = varray[1, 2, 3, 4, 5, 6];
7 while ($v = each(inout $a)) {
8 if ($v[1] < 4) $a[] = $v[1] + $v[1];
10 var_dump($a);
11 $a = varray[1, 2, 3, 4, 5, 6];
12 foreach ($a as $k => $v) {
13 if ($v >= 4) $a = $v + $v;
15 var_dump($a);