fork download
  1. <?php
  2. echo "Avec la méthode while <br>";
  3. $n=5;
  4. $x=2;
  5. $i=1;
  6. $p=$x;
  7. while ($i<$n) {
  8. $p=$p*$x;
  9. $i++;
  10. }
  11. echo "$p";
  12. ?>
Success #stdin #stdout 0.03s 25296KB
stdin
Standard input is empty
stdout
Avec la méthode while <br>32