Here is an easy way of calculating the time elapsed during some script execution in PHP, using microtime() :
1
2
3
4
5 $exec_start = microtime(true); // 'true' returns the seconds of type double
// ... do stuff
echo (microtime(true) - $exec_start) . ' seconds';
