PHP measure execution time of function

$a = microtime(true);
for ($x = 0; $x < 3; $x++)
  $temp = rand_char(1000);
echo “Rand:\t”.(microtime(true) – $a)”;

Leave a Reply