PHP uses the Gettimeofday function to return the current time and store it in an associative array _php tutorial

Source: Internet
Author: User

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 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.