mirror of
https://github.com/php/php-src.git
synced 2026-04-17 21:11:02 +02:00
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.
48 lines
878 B
PHP
48 lines
878 B
PHP
--TEST--
|
|
Bug #48678 (DateInterval segfaults when unserialising)
|
|
--FILE--
|
|
<?php
|
|
$x = new DateInterval("P3Y6M4DT12H30M5S");
|
|
print_r($x);
|
|
$y = unserialize(serialize($x));
|
|
print_r($y);
|
|
--EXPECTF--
|
|
DateInterval Object
|
|
(
|
|
[y] => 3
|
|
[m] => 6
|
|
[d] => 4
|
|
[h] => 12
|
|
[i] => 30
|
|
[s] => 5
|
|
[f] => 0
|
|
[weekday] => 0
|
|
[weekday_behavior] => 0
|
|
[first_last_day_of] => 0
|
|
[invert] => 0
|
|
[days] =>
|
|
[special_type] => 0
|
|
[special_amount] => 0
|
|
[have_weekday_relative] => 0
|
|
[have_special_relative] => 0
|
|
)
|
|
DateInterval Object
|
|
(
|
|
[y] => 3
|
|
[m] => 6
|
|
[d] => 4
|
|
[h] => 12
|
|
[i] => 30
|
|
[s] => 5
|
|
[f] => 0
|
|
[weekday] => 0
|
|
[weekday_behavior] => 0
|
|
[first_last_day_of] => 0
|
|
[invert] => 0
|
|
[days] => 0
|
|
[special_type] => 0
|
|
[special_amount] => 0
|
|
[have_weekday_relative] => 0
|
|
[have_special_relative] => 0
|
|
)
|