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