1--TEST--
2Test gmmktime() function : usage variation - Passing positive and negative float values to arguments.
3--FILE--
4<?php
5/* Prototype  : int gmmktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])
6 * Description: Get UNIX timestamp for a GMT date
7 * Source code: ext/date/php_date.c
8 * Alias to functions:
9 */
10
11echo "*** Testing gmmktime() : usage variation ***\n";
12
13//Initialise variables
14$hour = 8;
15$min = 8;
16$sec = 8;
17$mon = 8;
18$day = 8;
19$year = 2008;
20
21$inputs = array(
22
23	  'float 123456' => 123456,
24      'float -123456' => -123456,
25      'float -10.5' => -10.5,
26);
27
28// loop through each element of the array for min
29foreach($inputs as $key =>$value) {
30      echo "\n--$key--\n";
31	  var_dump( gmmktime($value, $min, $sec, $mon, $day, $year) );
32	  var_dump( gmmktime($hour, $value, $sec, $mon, $day, $year) );
33	  var_dump( gmmktime($hour, $min, $value, $mon, $day, $year) );
34	  var_dump( gmmktime($hour, $min, $sec, $value, $day, $year) );
35	  var_dump( gmmktime($hour, $min, $sec, $mon, $value, $value) );
36}
37?>
38===DONE===
39--EXPECTREGEX--
40\*\*\* Testing gmmktime\(\) : usage variation \*\*\*
41
42--float 123456--
43int\(1662595688\)
44int\(1225589768\)
45int\(1218306336\)
46(bool|int)\((false|325855037288)\)
47(bool|int)\((false|3844412784488)\)
48
49--float -123456--
50int\(773712488\)
51int\(1210775048\)
52int\(1218059424\)
53(bool|int)\((false|-323460834712)\)
54(bool|int)\((false|-3968710530712)\)
55
56--float -10.5--
57int\(1218118088\)
58int\(1218181808\)
59int\(1218182870\)
60int\(1170922088\)
61(bool|int)\((false|-62465356312)\)
62===DONE===
63