Header ("Content-type:text/html;charset=utf-8");
microtime-returns the current Unix timestamp and number of microseconds
$oldtime = Microtime (true);
echo "This script is running at:";
$v = 0;
for ($i = 0; $i < $i + +) {
$v + +;
}
$newtime =microtime (TRUE);
Get time difference
$runtime = $newtime-$oldtime;
Converts a timestamp into a string-var_export output or returns a string representation of a variable
$runtime =var_export ($runtime);
To intercept a string Substr_count count the number of occurrences of a word string
$postion = Substr_count ($runtime, ' E ');
$runtime = substr ($runtime, 0, $postion-1);
Converts a string value to floatfloatval-gets the floating-point value of a variable
$runtime = Floatval ($runtime)/1000;
echo $runtime. " Seconds ";
?>
http://www.bkjia.com/PHPjc/814669.html www.bkjia.com true http://www.bkjia.com/PHPjc/814669.html techarticle header (content-type:text/html;charset=utf-8);//microtime returns the current Unix timestamp and number of microseconds $oldtime = Microtime (true); echo This script is run at:; $v = 0; for ($i = 0; ....