1--TEST--
2Test gmdate() function : usage variation - Passing high positive and negetive float values to timestamp.
3--SKIPIF--
4<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?>
5--FILE--
6<?php
7/* Prototype  : string gmdate(string format [, long timestamp])
8 * Description: Format a GMT date/time
9 * Source code: ext/date/php_date.c
10 */
11
12echo "*** Testing gmdate() : usage variation ***\n";
13
14// Initialise all required variables
15date_default_timezone_set('UTC');
16$format = DATE_ISO8601;
17
18echo "\n-- Testing gmdate() function with float 12.3456789000e10 to timestamp --\n";
19$timestamp = 12.3456789000e10;
20var_dump( gmdate($format, $timestamp) );
21
22echo "\n-- Testing gmdate() function with float -12.3456789000e10 to timestamp --\n";
23$timestamp = -12.3456789000e10;
24var_dump( gmdate($format, $timestamp) );
25
26?>
27===DONE===
28--EXPECTF--
29*** Testing gmdate() : usage variation ***
30
31-- Testing gmdate() function with float 12.3456789000e10 to timestamp --
32
33Warning: gmdate() expects parameter 2 to be integer, float given in %s on line %d
34bool(false)
35
36-- Testing gmdate() function with float -12.3456789000e10 to timestamp --
37
38Warning: gmdate() expects parameter 2 to be integer, float given in %s on line %d
39bool(false)
40===DONE===