From c8a6a8abc0447d6d4639f2b9ffd998e471a2d83e Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Fri, 22 Apr 2022 15:29:15 +0100 Subject: [PATCH] Rename have_special_relative to from_string, fix serialisation constraint, and reorder fields --- ext/date/php_date.c | 20 +++++++------ ext/date/php_date.h | 1 + .../tests/DateInterval_serialize-001.phpt | 24 +++++++++------- .../tests/DateInterval_serialize-002.phpt | 28 +++++++++++-------- .../tests/DateInterval_serialize-003.phpt | 4 +-- ext/date/tests/DatePeriod_set_state.phpt | 4 +-- ext/date/tests/bug45682.phpt | 4 +-- ext/date/tests/bug48678.phpt | 4 +-- ext/date/tests/bug49081.phpt | 2 +- ext/date/tests/bug49778.phpt | 4 +-- ext/date/tests/bug52113.phpt | 26 ++++++++--------- ext/date/tests/bug52738.phpt | 2 +- ext/date/tests/bug52808.phpt | 12 ++++---- ext/date/tests/bug53437.phpt | 8 +++--- ext/date/tests/bug53437_var2.phpt | 8 +++--- ext/date/tests/bug53437_var4.phpt | 4 +-- ext/date/tests/bug53437_var5.phpt | 4 +-- ext/date/tests/bug53437_var6.phpt | 4 +-- ext/date/tests/bug60774.phpt | 4 +-- ext/date/tests/bug66545.phpt | 2 +- ext/date/tests/bug70153.phpt | 6 ++-- ext/date/tests/bug71700.phpt | 4 +-- ext/date/tests/bug73091.phpt | 4 +-- ext/date/tests/bug74274.phpt | 2 +- ext/date/tests/bug74524.phpt | 2 +- ext/date/tests/bug77571.phpt | 2 +- ext/date/tests/bug78452.phpt | 4 +-- ext/date/tests/bug79015.phpt | 4 +-- ext/date/tests/date_diff1.phpt | 4 +-- ext/date/tests/date_time_fractions.phpt | 4 +-- 30 files changed, 108 insertions(+), 97 deletions(-) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 0dff004b676..1e1aa03fc6f 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2077,11 +2077,6 @@ static void date_interval_object_to_hash(php_interval_obj *intervalobj, HashTabl PHP_DATE_INTERVAL_ADD_PROPERTY("s", s); ZVAL_DOUBLE(&zv, (double)intervalobj->diff->us / 1000000.0); zend_hash_str_update(props, "f", sizeof("f") - 1, &zv); - if (include_fakes) { - PHP_DATE_INTERVAL_ADD_PROPERTY("weekday", weekday); - PHP_DATE_INTERVAL_ADD_PROPERTY("weekday_behavior", weekday_behavior); - PHP_DATE_INTERVAL_ADD_PROPERTY("first_last_day_of", first_last_day_of); - } PHP_DATE_INTERVAL_ADD_PROPERTY("invert", invert); if (intervalobj->diff->days != -99999) { PHP_DATE_INTERVAL_ADD_PROPERTY("days", days); @@ -2090,12 +2085,19 @@ static void date_interval_object_to_hash(php_interval_obj *intervalobj, HashTabl zend_hash_str_update(props, "days", sizeof("days")-1, &zv); } if (include_fakes) { + PHP_DATE_INTERVAL_ADD_PROPERTY("weekday", weekday); + PHP_DATE_INTERVAL_ADD_PROPERTY("weekday_behavior", weekday_behavior); + PHP_DATE_INTERVAL_ADD_PROPERTY("first_last_day_of", first_last_day_of); PHP_DATE_INTERVAL_ADD_PROPERTY("special_type", special.type); PHP_DATE_INTERVAL_ADD_PROPERTY("special_amount", special.amount); PHP_DATE_INTERVAL_ADD_PROPERTY("have_weekday_relative", have_weekday_relative); + PHP_DATE_INTERVAL_ADD_PROPERTY("have_special_relative", have_special_relative); + ZVAL_LONG(&zv, (zend_long)intervalobj->civil_or_wall); + zend_hash_str_update(props, "civil_or_wall", strlen("civil_or_wall"), &zv); } - /* Records whether this is a special relative interval that can't be serialized */ - PHP_DATE_INTERVAL_ADD_PROPERTY("have_special_relative", have_special_relative); + /* Records whether this is a special relative interval that needs to be recreated from a string */ + ZVAL_BOOL(&zv, (zend_bool)intervalobj->from_string); + zend_hash_str_update(props, "from_string", strlen("from_string"), &zv); #undef PHP_DATE_INTERVAL_ADD_PROPERTY } @@ -3095,7 +3097,7 @@ static void php_date_sub(zval *object, zval *interval, zval *return_value) /* {{ intobj = Z_PHPINTERVAL_P(interval); DATE_CHECK_INITIALIZED(intobj->initialized, DateInterval); - if (intobj->diff->have_special_relative) { + if (intobj->diff->have_weekday_relative || intobj->diff->have_special_relative) { php_error_docref(NULL, E_WARNING, "Only non-special relative time specifications are supported for subtraction"); return; } @@ -4223,7 +4225,7 @@ PHP_METHOD(DateInterval, __serialize) intervalobj = Z_PHPINTERVAL_P(object); DATE_CHECK_INITIALIZED(intervalobj->initialized, DateInterval); - if (intervalobj->diff->have_special_relative) { + if (intervalobj->diff->have_weekday_relative || intervalobj->diff->have_special_relative) { zend_throw_exception_ex(NULL, 0, "Serializing special relative time specifications is not supported"); } diff --git a/ext/date/php_date.h b/ext/date/php_date.h index c30d34d3aa7..9df3c375948 100644 --- a/ext/date/php_date.h +++ b/ext/date/php_date.h @@ -72,6 +72,7 @@ static inline php_timezone_obj *php_timezone_obj_from_obj(zend_object *obj) { struct _php_interval_obj { timelib_rel_time *diff; int civil_or_wall; + bool from_string; bool initialized; zend_object std; }; diff --git a/ext/date/tests/DateInterval_serialize-001.phpt b/ext/date/tests/DateInterval_serialize-001.phpt index f0834172fb7..def7fcb2611 100644 --- a/ext/date/tests/DateInterval_serialize-001.phpt +++ b/ext/date/tests/DateInterval_serialize-001.phpt @@ -40,13 +40,13 @@ object(DateInterval)#1 (10) { int(0) ["days"]=> bool(false) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } Serialised object: -string(332) "O:12:"DateInterval":16:{s:1:"y";i:2;s:1:"m";i:0;s:1:"d";i:4;s:1:"h";i:6;s:1:"i";i:8;s:1:"s";i:0;s:1:"f";d:0;s:7:"weekday";i:0;s:16:"weekday_behavior";i:0;s:17:"first_last_day_of";i:0;s:6:"invert";i:0;s:4:"days";b:0;s:12:"special_type";i:0;s:14:"special_amount";i:0;s:21:"have_weekday_relative";i:0;s:21:"have_special_relative";i:0;}" +string(380) "O:12:"DateInterval":18:{s:1:"y";i:2;s:1:"m";i:0;s:1:"d";i:4;s:1:"h";i:6;s:1:"i";i:8;s:1:"s";i:0;s:1:"f";d:0;s:6:"invert";i:0;s:4:"days";b:0;s:7:"weekday";i:0;s:16:"weekday_behavior";i:0;s:17:"first_last_day_of";i:0;s:12:"special_type";i:0;s:14:"special_amount";i:0;s:21:"have_weekday_relative";i:0;s:21:"have_special_relative";i:0;s:13:"civil_or_wall";i:2;s:11:"from_string";b:0;}" Unserialised object: @@ -69,13 +69,13 @@ object(DateInterval)#2 (10) { int(0) ["days"]=> bool(false) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } Calling __serialize manually: -array(16) { +array(%d) { ["y"]=> int(2) ["m"]=> @@ -90,16 +90,16 @@ array(16) { int(0) ["f"]=> float(0) + ["invert"]=> + int(0) + ["days"]=> + bool(false) ["weekday"]=> int(0) ["weekday_behavior"]=> int(0) ["first_last_day_of"]=> int(0) - ["invert"]=> - int(0) - ["days"]=> - bool(false) ["special_type"]=> int(0) ["special_amount"]=> @@ -108,4 +108,8 @@ array(16) { int(0) ["have_special_relative"]=> int(0) + ["civil_or_wall"]=> + int(2) + ["from_string"]=> + bool(false) } diff --git a/ext/date/tests/DateInterval_serialize-002.phpt b/ext/date/tests/DateInterval_serialize-002.phpt index df31cf1910e..e72c39edc48 100644 --- a/ext/date/tests/DateInterval_serialize-002.phpt +++ b/ext/date/tests/DateInterval_serialize-002.phpt @@ -59,13 +59,13 @@ object(DateInterval)#3 (10) { int(0) ["days"]=> int(15820) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } Serialised object: -string(340) "O:12:"DateInterval":16:{s:1:"y";i:43;s:1:"m";i:3;s:1:"d";i:24;s:1:"h";i:1;s:1:"i";i:12;s:1:"s";i:27;s:1:"f";d:0;s:7:"weekday";i:0;s:16:"weekday_behavior";i:0;s:17:"first_last_day_of";i:0;s:6:"invert";i:0;s:4:"days";i:15820;s:12:"special_type";i:0;s:14:"special_amount";i:0;s:21:"have_weekday_relative";i:0;s:21:"have_special_relative";i:0;}" +string(388) "O:12:"DateInterval":18:{s:1:"y";i:43;s:1:"m";i:3;s:1:"d";i:24;s:1:"h";i:1;s:1:"i";i:12;s:1:"s";i:27;s:1:"f";d:0;s:6:"invert";i:0;s:4:"days";i:15820;s:7:"weekday";i:0;s:16:"weekday_behavior";i:0;s:17:"first_last_day_of";i:0;s:12:"special_type";i:0;s:14:"special_amount";i:0;s:21:"have_weekday_relative";i:0;s:21:"have_special_relative";i:0;s:13:"civil_or_wall";i:1;s:11:"from_string";b:0;}" Unserialised object: @@ -88,13 +88,13 @@ object(DateInterval)#4 (10) { int(0) ["days"]=> int(15820) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } Calling __serialize manually: -array(16) { +array(%d) { ["y"]=> int(43) ["m"]=> @@ -109,16 +109,16 @@ array(16) { int(27) ["f"]=> float(0) + ["invert"]=> + int(0) + ["days"]=> + int(15820) ["weekday"]=> int(0) ["weekday_behavior"]=> int(0) ["first_last_day_of"]=> int(0) - ["invert"]=> - int(0) - ["days"]=> - int(15820) ["special_type"]=> int(0) ["special_amount"]=> @@ -127,6 +127,10 @@ array(16) { int(0) ["have_special_relative"]=> int(0) + ["civil_or_wall"]=> + int(1) + ["from_string"]=> + bool(false) } @@ -150,6 +154,6 @@ object(DateInterval)#5 (10) { int(0) ["days"]=> int(15820) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } diff --git a/ext/date/tests/DateInterval_serialize-003.phpt b/ext/date/tests/DateInterval_serialize-003.phpt index f32f9d9858d..9b52c39c244 100644 --- a/ext/date/tests/DateInterval_serialize-003.phpt +++ b/ext/date/tests/DateInterval_serialize-003.phpt @@ -36,8 +36,8 @@ object(DateInterval)#1 (10) { int(0) ["days"]=> bool(false) - ["have_special_relative"]=> - int(1) + ["from_string"]=> + bool(false) } diff --git a/ext/date/tests/DatePeriod_set_state.phpt b/ext/date/tests/DatePeriod_set_state.phpt index 558afe3bea5..de41eac50a5 100644 --- a/ext/date/tests/DatePeriod_set_state.phpt +++ b/ext/date/tests/DatePeriod_set_state.phpt @@ -53,8 +53,8 @@ object(DatePeriod)#%d (6) { int(0) ["days"]=> bool(false) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } ["recurrences"]=> int(25) diff --git a/ext/date/tests/bug45682.phpt b/ext/date/tests/bug45682.phpt index 989c9451614..84178aadb84 100644 --- a/ext/date/tests/bug45682.phpt +++ b/ext/date/tests/bug45682.phpt @@ -32,6 +32,6 @@ object(DateInterval)#%d (%d) { int(0) ["days"]=> int(3) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } diff --git a/ext/date/tests/bug48678.phpt b/ext/date/tests/bug48678.phpt index 8ef58ca6af7..3934b187e70 100644 --- a/ext/date/tests/bug48678.phpt +++ b/ext/date/tests/bug48678.phpt @@ -19,7 +19,7 @@ DateInterval Object [f] => 0 [invert] => 0 [days] => - [have_special_relative] => 0 + [from_string] => ) DateInterval Object ( @@ -32,5 +32,5 @@ DateInterval Object [f] => 0 [invert] => 0 [days] => - [have_special_relative] => 0 + [from_string] => ) diff --git a/ext/date/tests/bug49081.phpt b/ext/date/tests/bug49081.phpt index 0e679da8b3a..6f98041e8f7 100644 --- a/ext/date/tests/bug49081.phpt +++ b/ext/date/tests/bug49081.phpt @@ -20,5 +20,5 @@ DateInterval Object [f] => 0 [invert] => 0 [days] => 30 - [have_special_relative] => 0 + [from_string] => ) diff --git a/ext/date/tests/bug49778.phpt b/ext/date/tests/bug49778.phpt index 2774d1b0a72..d4e1a2c0ace 100644 --- a/ext/date/tests/bug49778.phpt +++ b/ext/date/tests/bug49778.phpt @@ -27,8 +27,8 @@ object(DateInterval)#%d (%d) { int(0) ["days"]=> bool(false) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } 7 (unknown) diff --git a/ext/date/tests/bug52113.phpt b/ext/date/tests/bug52113.phpt index f973f210162..131243d9134 100644 --- a/ext/date/tests/bug52113.phpt +++ b/ext/date/tests/bug52113.phpt @@ -52,11 +52,11 @@ object(DateInterval)#%d (%d) { int(0) ["days"]=> int(0) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } -string(332) "O:12:"DateInterval":16:{s:1:"y";i:0;s:1:"m";i:0;s:1:"d";i:0;s:1:"h";i:4;s:1:"i";i:0;s:1:"s";i:0;s:1:"f";d:0;s:7:"weekday";i:0;s:16:"weekday_behavior";i:0;s:17:"first_last_day_of";i:0;s:6:"invert";i:0;s:4:"days";i:0;s:12:"special_type";i:0;s:14:"special_amount";i:0;s:21:"have_weekday_relative";i:0;s:21:"have_special_relative";i:0;}" -\DateInterval::__set_state(array( +string(380) "O:12:"DateInterval":18:{s:1:"y";i:0;s:1:"m";i:0;s:1:"d";i:0;s:1:"h";i:4;s:1:"i";i:0;s:1:"s";i:0;s:1:"f";d:0;s:6:"invert";i:0;s:4:"days";i:0;s:7:"weekday";i:0;s:16:"weekday_behavior";i:0;s:17:"first_last_day_of";i:0;s:12:"special_type";i:0;s:14:"special_amount";i:0;s:21:"have_weekday_relative";i:0;s:21:"have_special_relative";i:0;s:13:"civil_or_wall";i:1;s:11:"from_string";b:0;}" +DateInterval::__set_state(array( 'y' => 0, 'm' => 0, 'd' => 0, @@ -66,7 +66,7 @@ string(332) "O:12:"DateInterval":16:{s:1:"y";i:0;s:1:"m";i:0;s:1:"d";i:0;s:1:"h" 'f' => 0.0, 'invert' => 0, 'days' => 0, - 'have_special_relative' => 0, + 'from_string' => false, ))object(DateInterval)#%d (%d) { ["y"]=> int(0) @@ -86,8 +86,8 @@ string(332) "O:12:"DateInterval":16:{s:1:"y";i:0;s:1:"m";i:0;s:1:"d";i:0;s:1:"h" int(0) ["days"]=> int(0) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } object(DatePeriod)#%d (6) { ["start"]=> @@ -123,8 +123,8 @@ object(DatePeriod)#%d (6) { int(0) ["days"]=> int(0) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } ["recurrences"]=> int(3) @@ -150,8 +150,8 @@ object(DateInterval)#%d (%d) { int(1) ["days"]=> int(2400) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } object(DatePeriod)#%d (6) { ["start"]=> @@ -187,8 +187,8 @@ object(DatePeriod)#%d (6) { int(0) ["days"]=> int(0) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } ["recurrences"]=> int(3) diff --git a/ext/date/tests/bug52738.phpt b/ext/date/tests/bug52738.phpt index e4d2595e75e..e0f3a1ef5c8 100644 --- a/ext/date/tests/bug52738.phpt +++ b/ext/date/tests/bug52738.phpt @@ -31,5 +31,5 @@ di Object [f] => 0 [invert] => 0 [days] => - [have_special_relative] => 0 + [from_string] => ) diff --git a/ext/date/tests/bug52808.phpt b/ext/date/tests/bug52808.phpt index 3abd5261bd0..a059624fdd7 100644 --- a/ext/date/tests/bug52808.phpt +++ b/ext/date/tests/bug52808.phpt @@ -44,8 +44,8 @@ object(DateInterval)#%d (%d) { int(1) ["days"]=> int(437) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } object(DateInterval)#%d (%d) { ["y"]=> @@ -66,8 +66,8 @@ object(DateInterval)#%d (%d) { int(0) ["days"]=> int(294) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } object(DateInterval)#%d (%d) { ["y"]=> @@ -88,8 +88,8 @@ object(DateInterval)#%d (%d) { int(0) ["days"]=> int(294) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } Failed to parse interval (2007-05-11T15:30:00Z/) Failed to parse interval (2007-05-11T15:30:00Z) diff --git a/ext/date/tests/bug53437.phpt b/ext/date/tests/bug53437.phpt index afb67ad41a1..ed885696bec 100644 --- a/ext/date/tests/bug53437.phpt +++ b/ext/date/tests/bug53437.phpt @@ -69,8 +69,8 @@ object(DatePeriod)#%d (6) { int(0) ["days"]=> bool(false) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } ["recurrences"]=> int(3) @@ -118,8 +118,8 @@ object(DatePeriod)#%d (6) { int(0) ["days"]=> bool(false) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } ["recurrences"]=> int(3) diff --git a/ext/date/tests/bug53437_var2.phpt b/ext/date/tests/bug53437_var2.phpt index b625d572f7a..9ca6a0f6b27 100644 --- a/ext/date/tests/bug53437_var2.phpt +++ b/ext/date/tests/bug53437_var2.phpt @@ -31,8 +31,8 @@ object(DateInterval)#1 (%d) { int(0) ["days"]=> bool(false) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } object(DateInterval)#2 (%d) { ["y"]=> @@ -53,6 +53,6 @@ object(DateInterval)#2 (%d) { int(0) ["days"]=> bool(false) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } diff --git a/ext/date/tests/bug53437_var4.phpt b/ext/date/tests/bug53437_var4.phpt index 7c558a24c88..14823fb4ba4 100644 --- a/ext/date/tests/bug53437_var4.phpt +++ b/ext/date/tests/bug53437_var4.phpt @@ -40,8 +40,8 @@ object(DateInterval)#%d (%d) { int(0) ["days"]=> int(2) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } int(0) int(0) diff --git a/ext/date/tests/bug53437_var5.phpt b/ext/date/tests/bug53437_var5.phpt index 8e04fea933d..eb3722f38bb 100644 --- a/ext/date/tests/bug53437_var5.phpt +++ b/ext/date/tests/bug53437_var5.phpt @@ -30,6 +30,6 @@ object(DateInterval)#%d (%d) { int(0) ["days"]=> int(0) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } diff --git a/ext/date/tests/bug53437_var6.phpt b/ext/date/tests/bug53437_var6.phpt index aa7657eec14..cb76c66d4d9 100644 --- a/ext/date/tests/bug53437_var6.phpt +++ b/ext/date/tests/bug53437_var6.phpt @@ -30,6 +30,6 @@ object(DateInterval)#%d (%d) { int(0) ["days"]=> int(0) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } diff --git a/ext/date/tests/bug60774.phpt b/ext/date/tests/bug60774.phpt index 130048e71de..bb4f97f9c3f 100644 --- a/ext/date/tests/bug60774.phpt +++ b/ext/date/tests/bug60774.phpt @@ -27,8 +27,8 @@ object(DateInterval)#1 (%d) { int(0) ["days"]=> bool(false) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } 2 (unknown) diff --git a/ext/date/tests/bug66545.phpt b/ext/date/tests/bug66545.phpt index efe3e6d1eab..0d2f3375706 100644 --- a/ext/date/tests/bug66545.phpt +++ b/ext/date/tests/bug66545.phpt @@ -27,5 +27,5 @@ DateInterval Object [f] => 0 [invert] => 0 [days] => 14 - [have_special_relative] => 0 + [from_string] => ) diff --git a/ext/date/tests/bug70153.phpt b/ext/date/tests/bug70153.phpt index 556a5b4f7fd..25ddc9bcc2a 100644 --- a/ext/date/tests/bug70153.phpt +++ b/ext/date/tests/bug70153.phpt @@ -25,9 +25,9 @@ DateInterval Object [f] => 0 [invert] => 0 [days] => - [have_special_relative] => 0 + [from_string] => ) -O:12:"DateInterval":16:{s:1:"y";i:0;s:1:"m";i:1;s:1:"d";i:0;s:1:"h";i:0;s:1:"i";i:0;s:1:"s";i:0;s:1:"f";d:0;s:7:"weekday";i:0;s:16:"weekday_behavior";i:0;s:17:"first_last_day_of";i:0;s:6:"invert";i:0;s:4:"days";b:0;s:12:"special_type";i:0;s:14:"special_amount";i:0;s:21:"have_weekday_relative";i:0;s:21:"have_special_relative";i:0;}DateInterval Object +O:12:"DateInterval":18:{s:1:"y";i:0;s:1:"m";i:1;s:1:"d";i:0;s:1:"h";i:0;s:1:"i";i:0;s:1:"s";i:0;s:1:"f";d:0;s:6:"invert";i:0;s:4:"days";b:0;s:7:"weekday";i:0;s:16:"weekday_behavior";i:0;s:17:"first_last_day_of";i:0;s:12:"special_type";i:0;s:14:"special_amount";i:0;s:21:"have_weekday_relative";i:0;s:21:"have_special_relative";i:0;s:13:"civil_or_wall";i:1;s:11:"from_string";b:0;}DateInterval Object ( [y] => 0 [m] => 1 @@ -38,7 +38,7 @@ O:12:"DateInterval":16:{s:1:"y";i:0;s:1:"m";i:1;s:1:"d";i:0;s:1:"h";i:0;s:1:"i"; [f] => 0 [invert] => 0 [days] => - [have_special_relative] => 0 + [from_string] => ) bool(false) bool(false) diff --git a/ext/date/tests/bug71700.phpt b/ext/date/tests/bug71700.phpt index 243511fbf97..09f6e76058c 100644 --- a/ext/date/tests/bug71700.phpt +++ b/ext/date/tests/bug71700.phpt @@ -31,6 +31,6 @@ object(DateInterval)#3 (%d) { int(0) ["days"]=> int(30) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } diff --git a/ext/date/tests/bug73091.phpt b/ext/date/tests/bug73091.phpt index 7f16a024ad5..440f2bbca60 100644 --- a/ext/date/tests/bug73091.phpt +++ b/ext/date/tests/bug73091.phpt @@ -31,6 +31,6 @@ object(DateInterval)#%d (%d) { int(0) ["days"]=> int(-1) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } diff --git a/ext/date/tests/bug74274.phpt b/ext/date/tests/bug74274.phpt index b83a2b641c8..20387419728 100644 --- a/ext/date/tests/bug74274.phpt +++ b/ext/date/tests/bug74274.phpt @@ -20,5 +20,5 @@ DateInterval Object [f] => 0 [invert] => 0 [days] => 1 - [have_special_relative] => 0 + [from_string] => ) diff --git a/ext/date/tests/bug74524.phpt b/ext/date/tests/bug74524.phpt index 93f4cd92099..825fb0be8b3 100644 --- a/ext/date/tests/bug74524.phpt +++ b/ext/date/tests/bug74524.phpt @@ -22,5 +22,5 @@ DateInterval Object [f] => 0.920541 [invert] => 1 [days] => 227 - [have_special_relative] => 0 + [from_string] => ) diff --git a/ext/date/tests/bug77571.phpt b/ext/date/tests/bug77571.phpt index bc85354002c..84790e0cd67 100644 --- a/ext/date/tests/bug77571.phpt +++ b/ext/date/tests/bug77571.phpt @@ -23,5 +23,5 @@ DateInterval Object [f] => 0 [invert] => 0 [days] => 35 - [have_special_relative] => 0 + [from_string] => ) diff --git a/ext/date/tests/bug78452.phpt b/ext/date/tests/bug78452.phpt index ac4aa887f28..ba693655116 100644 --- a/ext/date/tests/bug78452.phpt +++ b/ext/date/tests/bug78452.phpt @@ -27,6 +27,6 @@ object(DateInterval)#3 (%d) { int(1) ["days"]=> int(33) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } diff --git a/ext/date/tests/bug79015.phpt b/ext/date/tests/bug79015.phpt index 69a197563ea..63dac799c54 100644 --- a/ext/date/tests/bug79015.phpt +++ b/ext/date/tests/bug79015.phpt @@ -25,6 +25,6 @@ object(DateInterval)#%d (%d) { int(0) ["days"]=> bool(false) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } diff --git a/ext/date/tests/date_diff1.phpt b/ext/date/tests/date_diff1.phpt index 437e43fc640..fa2c64ddd59 100644 --- a/ext/date/tests/date_diff1.phpt +++ b/ext/date/tests/date_diff1.phpt @@ -47,6 +47,6 @@ object(DateInterval)#%d (%d) { int(0) ["days"]=> int(33) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } diff --git a/ext/date/tests/date_time_fractions.phpt b/ext/date/tests/date_time_fractions.phpt index ada2e3e7720..4536e0f2eb2 100644 --- a/ext/date/tests/date_time_fractions.phpt +++ b/ext/date/tests/date_time_fractions.phpt @@ -77,8 +77,8 @@ object(DateInterval)#%d (%d) { int(0) ["days"]=> int(0) - ["have_special_relative"]=> - int(0) + ["from_string"]=> + bool(false) } 2016-10-03 13:20:06.724934 2016-10-03 13:20:07.103123