fork download
  1. <?php
  2.  
  3. // your code goes here
  4. $x = 10;
  5. $y = 3;
  6.  
  7. $startInt = time();
  8. echo "(int) start = $startInt\n";
  9.  
  10. for ($i = 0; $i < 100000; $i++) {
  11. (int) $x / $y;
  12. }
  13.  
  14. $finishInt = time();
  15. echo "(int) finish = $finishInt\n";
  16. echo "DIFF = " . ($finishInt - $startInt) . "\n";
  17.  
  18. $startFloor = time();
  19. echo "floor start = $startFloor\n";
  20.  
  21. for ($i = 0; $i < 100000; $i++) {
  22. floor($x / $y);
  23. }
  24.  
  25. $finishFloor = time();
  26. echo "floor finish = $finishFloor\n";
  27. echo "DIFF = " . ($finishFloor - $startFloor) . "\n";
Success #stdin #stdout 0.04s 25820KB
stdin
Standard input is empty
stdout
(int) start = 1753785502
(int) finish = 1753785502
DIFF = 0
floor start = 1753785502
floor finish = 1753785502
DIFF = 0