????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--
Bug #52808 (Segfault when specifying interval as two dates)
--FILE--
<?php
date_default_timezone_set('Europe/Oslo');
$intervals = array(
"2008-05-11T15:30:00Z/2007-03-01T13:00:00Z",
"2007-05-11T15:30:00Z/2008-03-01T13:00:00Z",
"2007-05-11T15:30:00Z 2008-03-01T13:00:00Z",
"2007-05-11T15:30:00Z/",
"2007-05-11T15:30:00Z",
"2007-05-11T15:30:00Z/:00Z",
);
foreach($intervals as $iv) {
try
{
$di = new DateInterval($iv);
var_dump($di);
}
catch ( Exception $e )
{
echo $e->getMessage(), "\n";
}
}
echo "==DONE==\n";
?>
--EXPECTF--
object(DateInterval)#%d (15) {
["y"]=>
int(1)
["m"]=>
int(2)
["d"]=>
int(10)
["h"]=>
int(2)
["i"]=>
int(30)
["s"]=>
int(0)
["weekday"]=>
int(0)
["weekday_behavior"]=>
int(0)
["first_last_day_of"]=>
int(0)
["invert"]=>
int(1)
["days"]=>
int(437)
["special_type"]=>
int(0)
["special_amount"]=>
int(0)
["have_weekday_relative"]=>
int(0)
["have_special_relative"]=>
int(0)
}
object(DateInterval)#%d (15) {
["y"]=>
int(0)
["m"]=>
int(9)
["d"]=>
int(18)
["h"]=>
int(21)
["i"]=>
int(30)
["s"]=>
int(0)
["weekday"]=>
int(0)
["weekday_behavior"]=>
int(0)
["first_last_day_of"]=>
int(0)
["invert"]=>
int(0)
["days"]=>
int(294)
["special_type"]=>
int(0)
["special_amount"]=>
int(0)
["have_weekday_relative"]=>
int(0)
["have_special_relative"]=>
int(0)
}
object(DateInterval)#%d (15) {
["y"]=>
int(0)
["m"]=>
int(9)
["d"]=>
int(18)
["h"]=>
int(21)
["i"]=>
int(30)
["s"]=>
int(0)
["weekday"]=>
int(0)
["weekday_behavior"]=>
int(0)
["first_last_day_of"]=>
int(0)
["invert"]=>
int(0)
["days"]=>
int(294)
["special_type"]=>
int(0)
["special_amount"]=>
int(0)
["have_weekday_relative"]=>
int(0)
["have_special_relative"]=>
int(0)
}
DateInterval::__construct(): Failed to parse interval (2007-05-11T15:30:00Z/)
DateInterval::__construct(): Failed to parse interval (2007-05-11T15:30:00Z)
DateInterval::__construct(): Unknown or bad format (2007-05-11T15:30:00Z/:00Z)
==DONE==