fork(21) download
  1. <?php
  2.  
  3. function test($x)
  4. {
  5. $t1 = microtime(true);
  6. $a = 0;
  7. for($i = 0; $i < $x; $i++)
  8. {
  9. $a++;
  10. }
  11. $t2 = microtime(true);
  12.  
  13. echo "Time for $x was " . ($t2 - $t1) . "\n";
  14.  
  15. return $a;
  16. }
  17.  
  18.  
  19. echo test(100000000);
Success #stdin #stdout 2.73s 23792KB
stdin
Standard input is empty
stdout
Time for 100000000 was 2.7089190483093
100000000