php-src/ext/date/tests/bug53437_var5.phpt
Derick Rethans 55626549d8 Improve support for microseconds with Date/Time
It fixes several bugs:

- Fixed bug #45554 (Inconsistent behavior of the u format char).
- Fixed bug #48225 (DateTime parser doesn't set microseconds for "now").
- Fixed bug #52514 (microseconds are missing in DateTime class).
- Fixed bug #52519 (microseconds in DateInterval are missing).
- Fixed bug #68506 (General DateTime improvments needed for microseconds to become useful).
- Fixed bug #73109 (timelib_meridian doesn't parse dots correctly).
- Fixed bug #73247 (DateTime constructor does not initialise microseconds property).

It also updates timelib to 2016.04, and updates a data mapping file, which
causes changes to the volatile abbreviations tests.
2016-10-05 15:03:06 -04:00

50 lines
1.1 KiB
PHP

--TEST--
Bug #53437 DateInterval unserialize bad data, 64 bit
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) { die('skip true 64 bit only'); } ?>
--FILE--
<?php
$s = 'O:12:"DateInterval":15:{s:1:"y";s:1:"2";s:1:"m";s:1:"0";s:1:"d";s:3:"bla";s:1:"h";s:1:"6";s:1:"i";s:1:"8";s:1:"s";s:1:"0";s:7:"weekday";i:10;s:16:"weekday_behavior";i:10;s:17:"first_last_day_of";i:0;s:6:"invert";i:0;s:4:"days";s:4:"aoeu";s:12:"special_type";i:0;s:14:"special_amount";s:21:"234523452345234532455";s:21:"have_weekday_relative";i:21474836489;s:21:"have_special_relative";s:3:"bla";}';
$di = unserialize($s);
var_dump($di);
?>
==DONE==
--EXPECTF--
object(DateInterval)#%d (16) {
["y"]=>
int(2)
["m"]=>
int(0)
["d"]=>
int(0)
["h"]=>
int(6)
["i"]=>
int(8)
["s"]=>
int(0)
["weekday"]=>
int(10)
["weekday_behavior"]=>
int(10)
["first_last_day_of"]=>
int(0)
["invert"]=>
int(0)
["days"]=>
int(0)
["special_type"]=>
int(0)
["special_amount"]=>
int(9223372036854775807)
["have_weekday_relative"]=>
int(9)
["have_special_relative"]=>
int(0)
["f"]=>
float(-1)
}
==DONE==