1--TEST--
2Test gettimeofday() function : basic functionality
3--FILE--
4<?php
5echo "*** Testing gettimeofday() : basic functionality ***\n";
6
7date_default_timezone_set("Asia/Calcutta");
8
9// Initialise all required variables
10$get_as_float = true;
11
12// Calling gettimeofday() with all possible arguments
13var_dump( gettimeofday($get_as_float) );
14
15// Calling gettimeofday() with mandatory arguments
16var_dump( gettimeofday() );
17
18// Initialise all required variables
19$get_as_float = false;
20
21// Calling gettimeofday() with all possible arguments
22var_dump( gettimeofday($get_as_float) );
23
24?>
25--EXPECTF--
26*** Testing gettimeofday() : basic functionality ***
27float(%f)
28array(4) {
29  ["sec"]=>
30  int(%d)
31  ["usec"]=>
32  int(%d)
33  ["minuteswest"]=>
34  int(-330)
35  ["dsttime"]=>
36  int(0)
37}
38array(4) {
39  ["sec"]=>
40  int(%d)
41  ["usec"]=>
42  int(%d)
43  ["minuteswest"]=>
44  int(-330)
45  ["dsttime"]=>
46  int(0)
47}
48