File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / date / tests / bug48678.phpt
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 01:31:39 2013 UTC (11 years, 1 month ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17, HEAD
5.4.17

--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
    [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
    [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
)

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>