fork(1) download
  1. <?php
  2.  
  3. function nums_from($from, $to, $s, $prev = 0) {
  4. echo ( $from + $prev ).' ' ;
  5.  
  6. if ($from < $to){
  7. nums_from($from + $s, $to, $s, $from );
  8. }
  9. }
  10. nums_from(1, 10, 2);
Success #stdin #stdout 0.02s 24448KB
stdin
Standard input is empty
stdout
1 4 8 12 16 20