fork download
  1. <?php
  2. $f1 = 0;
  3. $f2 = 1;
  4.  
  5. for ($i = 0; $i < 7; $i++) {
  6. echo $f2;
  7. echo " ";
  8. $next = $f1 + $f2;
  9. $f1 = $f2;
  10. $f2 = $next;
  11. }
  12. // your code goes here
Success #stdin #stdout 0.02s 25980KB
stdin
Standard input is empty
stdout
1 1 2 3 5 8 13