1--TEST--
2Test gmmktime() function : usage variation - Passing positive and negative float values to arguments 64 bits.
3--SKIPIF--
4<?php
5if (PHP_INT_SIZE == 4) die('skip 64 bit only');
6?>
7--FILE--
8<?php
9echo "*** Testing gmmktime() : usage variation ***\n";
10
11//Initialise variables
12$hour = 8;
13$min = 8;
14$sec = 8;
15$mon = 8;
16$day = 8;
17$year = 2008;
18
19$inputs = array(
20
21      'float 123456' => 123456,
22      'float -123456' => -123456,
23      'float -10.5' => -10.5,
24);
25
26// loop through each element of the array for min
27foreach($inputs as $key =>$value) {
28      echo "\n--$key--\n";
29      var_dump( gmmktime($value, $min, $sec, $mon, $day, $year) );
30      var_dump( gmmktime($hour, $value, $sec, $mon, $day, $year) );
31      var_dump( gmmktime($hour, $min, $value, $mon, $day, $year) );
32      var_dump( gmmktime($hour, $min, $sec, $value, $day, $year) );
33      var_dump( gmmktime($hour, $min, $sec, $mon, $value, $value) );
34}
35?>
36--EXPECT--
37 *** Testing gmmktime() : usage variation ***
38
39--float 123456--
40int(1662595688)
41int(1225589768)
42int(1218306336)
43int(325855037288)
44int(3844412784488)
45
46--float -123456--
47int(773712488)
48int(1210775048)
49int(1218059424)
50int(-323460834712)
51int(-3968710530712)
52
53--float -10.5--
54int(1218118088)
55int(1218181808)
56int(1218182870)
57int(1170922088)
58int(-62465356312)
59