- var_dump: documentation ( source)
- microtime: documentation ( source)
- array_merge: documentation ( source)
- range: documentation ( source)
<?php
$a = range(0, 250_000);
$b = range(250_000, 500_000);
$start = microtime(true);
foreach(array_merge($a, $b) as $key => $item){
//
}
$elapsed = microtime(true) - $start;
var_dump($elapsed);