Annotation of embedaddon/php/ext/date/tests/bug52738.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: Bug #52738 (Can't use new properties in class extended from DateInterval)
3: --FILE--
4: <?php
5: class di extends DateInterval {
6: public $unit = 1;
7: }
8:
9: $I = new di('P10D');
10: echo $I->unit."\n";
11: $I->unit++;
12: echo $I->unit."\n";
13: $I->unit = 42;
14: echo $I->unit."\n";
15: $I->d++;
16: print_r($I);
17: --EXPECT--
18: 1
19: 2
20: 42
21: di Object
22: (
23: [unit] => 42
24: [y] => 0
25: [m] => 0
26: [d] => 11
27: [h] => 0
28: [i] => 0
29: [s] => 0
1.1.1.2 ! misho 30: [weekday] => 0
! 31: [weekday_behavior] => 0
! 32: [first_last_day_of] => 0
1.1 misho 33: [invert] => 0
34: [days] =>
1.1.1.2 ! misho 35: [special_type] => 0
! 36: [special_amount] => 0
! 37: [have_weekday_relative] => 0
! 38: [have_special_relative] => 0
1.1 misho 39: )
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>