Guest User

Untitled

a guest
Nov 18th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. <?php
  2.  
  3. $d = range(1, 20000);
  4.  
  5. $t0 = microtime(true);
  6. $r = array_reduce(
  7. $d,
  8. function (&$carry, $item) {
  9. $carry []= $item;
  10. return $carry;
  11. },
  12. []
  13. );
  14. printf("%fms\n", (microtime(true) - $t0) * 1000);
Add Comment
Please, Sign In to add comment