2009-06-25 15:04:14 +00:00
|
|
|
--TEST--
|
2011-12-07 19:42:44 +00:00
|
|
|
Bug #48678 (DateInterval segfaults when unserialising)
|
2009-06-25 15:04:14 +00:00
|
|
|
--FILE--
|
|
|
|
<?php
|
2011-12-06 06:00:45 +00:00
|
|
|
$x = new DateInterval("P3Y6M4DT12H30M5S");
|
2009-06-25 15:04:14 +00:00
|
|
|
print_r($x);
|
|
|
|
$y = unserialize(serialize($x));
|
|
|
|
print_r($y);
|
2011-12-07 09:03:07 +00:00
|
|
|
--EXPECTF--
|
2009-06-25 15:04:14 +00:00
|
|
|
DateInterval Object
|
|
|
|
(
|
|
|
|
[y] => 3
|
|
|
|
[m] => 6
|
|
|
|
[d] => 4
|
|
|
|
[h] => 12
|
|
|
|
[i] => 30
|
|
|
|
[s] => 5
|
2013-03-15 15:59:54 +00:00
|
|
|
[weekday] => 0
|
|
|
|
[weekday_behavior] => 0
|
|
|
|
[first_last_day_of] => 0
|
2009-06-25 15:04:14 +00:00
|
|
|
[invert] => 0
|
2013-03-15 15:59:54 +00:00
|
|
|
[days] =>
|
|
|
|
[special_type] => 0
|
|
|
|
[special_amount] => 0
|
|
|
|
[have_weekday_relative] => 0
|
|
|
|
[have_special_relative] => 0
|
2009-06-25 15:04:14 +00:00
|
|
|
)
|
|
|
|
DateInterval Object
|
|
|
|
(
|
|
|
|
[y] => 3
|
|
|
|
[m] => 6
|
|
|
|
[d] => 4
|
|
|
|
[h] => 12
|
|
|
|
[i] => 30
|
|
|
|
[s] => 5
|
2013-03-15 15:59:54 +00:00
|
|
|
[weekday] => 0
|
|
|
|
[weekday_behavior] => 0
|
|
|
|
[first_last_day_of] => 0
|
2009-06-25 15:04:14 +00:00
|
|
|
[invert] => 0
|
2013-03-15 15:59:54 +00:00
|
|
|
[days] => 0
|
|
|
|
[special_type] => 0
|
|
|
|
[special_amount] => 0
|
|
|
|
[have_weekday_relative] => 0
|
|
|
|
[have_special_relative] => 0
|
2009-06-25 15:04:14 +00:00
|
|
|
)
|