PHP uses the Gettimeofday function to return the current time and store it in an associative array.
This article mainly introduces PHP using the Gettimeofday function to return the current time and stored in the associative array method, involving the use of PHP gettimeofday function skills, the need for friends can refer to the following
This example describes how PHP uses the Gettimeofday function to return the current time and store it in an associative array. Share to 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.
?
1 2 3 4 5 6 7 |
$Now = Gettimeofday (); echo "As an associative array:\n"; foreach ($Now as $Key = = $Value) { echo "$Key = $Value \ n"; } ?> |
The output results are as follows:
?
1 2 3 4 |
SEC = 1261918156 USEC = 724964 Minuteswest = 0 Dsttime = 0 |
I hope this article is helpful to everyone's PHP programming.
http://www.bkjia.com/PHPjc/970746.html www.bkjia.com true http://www.bkjia.com/PHPjc/970746.html techarticle PHP uses the Gettimeofday function to return the current time and store it in an associative array this article mainly introduces the method that PHP uses the Gettimeofday function to return the current time and store it in an associative array ...