tags:

views:

73

answers:

3

is there any function in php through which we can fast the execution time of php script

+2  A: 

Assuming PHP 5 you can compute duration in seconds (with millisecond accuracy) as:

<?php
  $start = microtime(true);

  // code

  $duration = microtime(true) - $start;
?>

Further reading in the PHP manual.

Mark E
A: 

Or, if you use xdebug (which I recommend), xdebug_time_index()

orlandu63
A: 
Anirudh Goel