1//Timing executation time of script
2$startTime = microtime(true); //get time in micro seconds(1 millionth)
3usleep(250);
4$endTime = microtime(true);
5
6echo "milliseconds to execute:". ($endTime-$startTime)*1000;
1$now = DateTime::createFromFormat('U.u', microtime(true));
2echo $now->format("m-d-Y H:i:s.u");