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