????JFIF??x?x????'
| Server IP : 79.136.114.73 / Your IP : 216.73.216.55 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/home/b8009/php-5.6.22/ext/date/tests/ |
Upload File : |
--TEST--
Test getdate() function : usage variation - Passing high positive and negative float values to timestamp.
--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===
--EXPECTREGEX--
\*\*\* Testing getdate\(\) : usage variation \*\*\*
-- Testing getdate\(\) function by passing float 12.3456789000e10 value to timestamp --
array\(11\) {
\["seconds"\]=>
int\((.+)\)
\["minutes"\]=>
int\((43|0)\)
\["hours"\]=>
int\((10|6)\)
\["mday"\]=>
int\((26|11)\)
\["wday"\]=>
int\((2|6)\)
\["mon"\]=>
int\(3\)
\["year"\]=>
int\((1935|5882)\)
\["yday"\]=>
int\((84|69)\)
\["weekday"\]=>
string\((7|8)\) "(Tuesday|Saturday)"
\["month"\]=>
string\(5\) "March"
\[0\]=>
int\((-1097262584|123456789000)\)
}
-- Testing getdate\(\) function by passing float -12.3456789000e10 value to timestamp --
array\(11\) {
\["seconds"\]=>
int\((.+)\)
\["minutes"\]=>
int\((39|23)\)
\["hours"\]=>
int\((0|2|5)\)
\["mday"\]=>
int\((9|14|23)\)
\["wday"\]=>
int\((0|6)\)
\["mon"\]=>
int\((10|12)\)
\["year"\]=>
int\((2004|1901|-1943)\)
\["yday"\]=>
int\((282|347|295)\)
\["weekday"\]=>
string\((6|8)\) "(Sunday|Saturday)"
\["month"\]=>
string\((7|8)\) "(October|December)"
\[0\]=>
int\((1097262584|-2147483648|-123456789000)\)
}
===DONE===