fork(1) download
  1. <?php
  2.  
  3. function double($x) {
  4. echo 2*$x, PHP_EOL;
  5. }
  6.  
  7. $array = [1, 2, 3, 4];
  8.  
  9. foreach ($array as $x) {
  10. double($x);
  11. }
Success #stdin #stdout 0s 82880KB
stdin
Standard input is empty
stdout
2
4
6
8