<pre><?php
function f(&$a) { return $a; }
$x = array('a','b','c');
foreach (array_keys($x) as $k) {
$y =& f($x[$k]);
$z[] =& $y;
}
var_dump($x, $z);
Output:
array(3) { [0]=> string(1) "a" [1]=> string(1) "b" [2]=> string(1) "c" } array(3) { [0]=> &string(1) "c" [1]=> &string(1) "c" [2]=> &string(1) "c" }