-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/src/php/tests/lang/
File Upload :
Current File : //usr/src/php/tests/lang/foreach_with_references_001.phpt

--TEST--
foreach() with references
--FILE--
<?php

$arr = array(1 => "one", 2 => "two", 3 => "three");

foreach($arr as $key => $val) {
	$val = $key;
}

print_r($arr);

foreach($arr as $key => &$val) {
	$val = $key;
}

print_r($arr);

--EXPECT--
Array
(
    [1] => one
    [2] => two
    [3] => three
)
Array
(
    [1] => 1
    [2] => 2
    [3] => 3
)

Copyright © 2017 || Recoded By Mr.Bumblebee