1--TEST--
2foreach() with references
3--FILE--
4<?php
5
6$arr = array(1 => "one", 2 => "two", 3 => "three");
7
8foreach($arr as $key => $val) {
9	$val = $key;
10}
11
12print_r($arr);
13
14foreach($arr as $key => &$val) {
15	$val = $key;
16}
17
18print_r($arr);
19--EXPECT--
20Array
21(
22    [1] => one
23    [2] => two
24    [3] => three
25)
26Array
27(
28    [1] => 1
29    [2] => 2
30    [3] => 3
31)
32