Guest User

Untitled

a guest
Feb 13th, 2017
435
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. // composer require devster/ubench
  4. require_once __DIR__ . '/vendor/autoload.php';
  5.  
  6. $bench = new Ubench;
  7. $bench->start();
  8.  
  9. $idsArray = [];
  10.  
  11. for ($i = 0; $i < 7000; $i++) {
  12.     $idsArray[] = [ 0, 1, 2, 3, 4, 5 ];
  13. }
  14.  
  15. count(call_user_func_array('array_merge', $idsArray));
  16.  
  17. $bench->end();
  18.  
  19. echo 'Time     :' . $bench->getTime() . "\n";
  20. echo 'Memory   :' . $bench->getMemoryUsage() . "\n";
  21. echo 'Mem. Peak:' . $bench->getMemoryPeak() . "\n";
RAW Paste Data