Home >Backend Development >PHP Tutorial >PHP uses the gettimeofday function to return the current time and store it in an associative array_PHP tutorial
This article mainly introduces how PHP uses the gettimeofday function to return the current time and stores it in an associative array. Regarding the usage skills of gettimeofday function in php, friends who need it can refer to it
The example in this article describes how PHP uses the gettimeofday function to return the current time and store it in an associative array. Share it with everyone for your reference. The specific analysis is as follows:
The official English description is as follows:
Key Description
sec Seconds since midnight before January 1, 1970
usec Microseconds since the sec value
minuteswest
Local time zone difference from GMT, in minutes
dsttime 1 iff daylight savings time is in effect,
0 iff not.
?
3 4
5
6
|
$Now = gettimeofday(); echo "As an associative array:n";
|
1 2 3 4 | sec => 1261918156 usec => 724964 minuteswest => 0 dsttime => 0 |