- count: documentation ( source)
- hrtime: documentation ( source)
<?php
namespace A;
$t1 = hrtime(true);
for ($i = 0; $i < 6000000; $i++) {
count([]);
}
$t2 = hrtime(true);
$t3 = hrtime(true);
for ($i = 0; $i < 6000000; $i++) {
\count([]);
}
$t4 = hrtime(true);
echo "Without import: " . (($t2 - $t1) / 1000000) . " ms\n";
echo "With import : " . (($t4 - $t3) / 1000000) . " ms\n";