fork(2) download
  1. <?php
  2.  
  3. $arr = range(1, 5);
  4.  
  5. foreach($arr as &$item) {
  6. $item *= 2;
  7. }
  8.  
  9. print_r($arr);
Success #stdin #stdout 0.01s 82560KB
stdin
Standard input is empty
stdout
Array
(
    [0] => 2
    [1] => 4
    [2] => 6
    [3] => 8
    [4] => 10
)