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