.01 .02 .03 .04 .05 .06 .07 .08 .09 .10 .11 .12 .13 .14 .15 .16 .17 .18 .19 .20 .21 .22 .23 .24 .25 .26 .27 .28 .29 .30 | <?php define ('MAX',20000); function f1() { $a=0; while($a <= MAX) { echo $a. '<br />'; $a++; } } function f2() { for($a=0; $a<= MAX; $a++) { echo $a. '<br />'; } } $t1 = microtime(true); f1(); echo 'Temps 1: ' , (microtime(true) - $t1) , "<br />"; $t2 = microtime(true); f2(); echo 'Temps 2: ' , (microtime(true) - $t2) , "<br />"; ?> |
Langue | ![]() |
Date | 21 Déc 2020 |
Taille | 0.87 Mo |
Cat | Galeries |