blob: a6ef3b6fb9df6962c87b4350a166946077670641 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
--TEST--
Test getdate() function : usage variation - Passing high positive and negative float values to timestamp.
--SKIPIF--
<?php if (PHP_INT_SIZE != 4) echo "skip this test is for 32-bit only"; ?>
--FILE--
<?php
/* Prototype : array getdate([int timestamp])
* Description: Get date/time information
* Source code: ext/date/php_date.c
* Alias to functions:
*/
echo "*** Testing getdate() : usage variation ***\n";
date_default_timezone_set("Asia/Calcutta");
echo "\n-- Testing getdate() function by passing float 12.3456789000e10 value to timestamp --\n";
$timestamp = 12.3456789000e10;
var_dump( getdate($timestamp) );
echo "\n-- Testing getdate() function by passing float -12.3456789000e10 value to timestamp --\n";
$timestamp = -12.3456789000e10;
var_dump( getdate($timestamp) );
?>
===DONE===
--EXPECTF--
*** Testing getdate() : usage variation ***
-- Testing getdate() function by passing float 12.3456789000e10 value to timestamp --
Warning: getdate() expects parameter 1 to be int, float given in %s on line %d
bool(false)
-- Testing getdate() function by passing float -12.3456789000e10 value to timestamp --
Warning: getdate() expects parameter 1 to be int, float given in %s on line %d
bool(false)
===DONE===
|