fork(2) download
  1. <?php
  2. $a = array('aa','bb','cc','dd');
  3.  
  4. function addRq($sValue) {
  5. return 'rq'.$sValue;
  6. }
  7. $newA = array_map("addRq", $a);
  8. var_dump($newA);
  9.  
Success #stdin #stdout 0.01s 23540KB
stdin
Standard input is empty
stdout
array(4) {
  [0]=>
  string(4) "rqaa"
  [1]=>
  string(4) "rqbb"
  [2]=>
  string(4) "rqcc"
  [3]=>
  string(4) "rqdd"
}