1--TEST--
2Test idate() function : usage variation - Passing higher 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  : int idate(string format [, int timestamp])
8 * Description: Format a local time/date as integer
9 * Source code: ext/date/php_date.c
10 * Alias to functions:
11 */
12
13echo "*** Testing idate() : usage variation ***\n";
14
15// Initialise function arguments not being substituted (if any)
16$format = 'Y';
17date_default_timezone_set("Asia/Calcutta");
18
19echo "\n-- Testing idate() function with float 12.3456789000e10 to timestamp --\n";
20$timestamp = 12.3456789000e10;
21var_dump( idate($format, $timestamp) );
22
23echo "\n-- Testing idate() function with float -12.3456789000e10 to timestamp --\n";
24$timestamp = -12.3456789000e10;
25var_dump( idate($format, $timestamp) );
26
27?>
28===DONE===
29--EXPECTF--
30*** Testing idate() : usage variation ***
31
32-- Testing idate() function with float 12.3456789000e10 to timestamp --
33
34Warning: idate() expects parameter 2 to be integer, float given in %s on line %d
35bool(false)
36
37-- Testing idate() function with float -12.3456789000e10 to timestamp --
38
39Warning: idate() expects parameter 2 to be integer, float given in %s on line %d
40bool(false)
41===DONE===