<?php
$starttime
= microtime(true);
// Start Code Excecution
for
(
$i
= 0;
$i
< 1000000; ++
$i
) {
$a
=
$i
;
}
// End Code Excecution
$endttime
= microtime(true);
$duration
= (float)(
$endttime
-
$starttime
);
$duration
= number_format(
$duration
,2,
'.'
,
''
);
echo
$duration
.
" Seconds"
;
// result somthing like 0.88 Seconds
?>
0 comments:
Post a Comment