ң

microtime

(PHP 3, PHP 4)

microtime - UNIX timestamp .

string microtime (void)

"msec sec", sec , Unix Epoch ( 0:00:00 January 1, 1970 GMT), msec . , gettimeofday().

.

1. microtime()
function getmicrotime(){ list($usec, $sec) = explode(" ",microtime()); return ((float)$usec + (float)$sec); } $time_start = getmicrotime(); for ($i=0; $i < 1000; $i++){ // , 1000 } $time_end = getmicrotime(); $time = $time_end - $time_start; echo "Did nothing in $time seconds";

. time() .


ң
localtime mktime