- microtime: documentation ( source)
- array_filter: documentation ( source)
- range: documentation ( source)
- printf: documentation ( source)
<?php
$arr = range(1,150000);
$t = microtime(true);
array_filter($arr);
$t = microtime(true) - $t;
printf('array_filter took %0.6f seconds to filter through %d elements', $t, count($arr));