Advertisement
Guest User

Untitled

a guest
Jul 31st, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. inbound_services:
  2. - warmup
  3.  
  4. <?php
  5. $starttime = microtime(true);
  6.  
  7. echo "Starts performing.<br>";
  8. for ($i = 1; $i <= 1000000; $i++) {
  9. $test = md5($i);
  10. $test2 = hash("sha512", $test);
  11. $newstring = $test . "-" . $test2;
  12. $test3 = hash("sha512", $newstring);
  13. $newstring2 = $newstring . "-" . $test3;
  14. $test4 = hash("sha512", $newstring2);
  15. }
  16. echo "Done performing.";
  17. echo "<hr>";
  18.  
  19. $diff = microtime(true) - $starttime;
  20.  
  21. $sec = intval($diff);
  22. $micro = $diff - $sec;
  23.  
  24. $final = strftime('%T', mktime(0, 0, $sec)) . str_replace('0.', '.', sprintf('%.3f', $micro));
  25. echo "Execution time total: $final";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement