<?php $arr = range(1, 5); foreach($arr as &$item) { $item *= 2;} print_r($arr);
Standard input is empty
Array ( [0] => 2 [1] => 4 [2] => 6 [3] => 8 [4] => 10 )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!