@@ -14,12 +14,8 @@ class C {
14
14
static public $ pubs2 ;
15
15
static private $ privs1 ;
16
16
static private $ privs2 ;
17
- public $ pubVirt1 { get {} set {} }
18
- public $ pubVirt2 { get {} }
19
- public $ pubVirt3 { set {} }
20
- private $ privVirt1 { get {} set {} }
21
- private $ privVirt2 { get {} }
22
- private $ privVirt3 { set {} }
17
+ public $ hookNoVirt { set { $ this ->hookNoVirt = strtoupper ( $ value ); } }
18
+ public $ hookVirt { get { return 42 ; } }
23
19
}
24
20
25
21
$ rc = new ReflectionClass ("C " );
@@ -49,7 +45,7 @@ var_dump($rc->getProperties($virtFlag));
49
45
--EXPECTF--
50
46
No properties:array(0) {
51
47
}
52
- Public properties:array(7 ) {
48
+ Public properties:array(6 ) {
53
49
[0]=>
54
50
object(ReflectionProperty)#%d (2) {
55
51
["name"]=>
@@ -81,26 +77,19 @@ Public properties:array(7) {
81
77
[4]=>
82
78
object(ReflectionProperty)#%d (2) {
83
79
["name"]=>
84
- string(8 ) "pubVirt1 "
80
+ string(10 ) "hookNoVirt "
85
81
["class"]=>
86
82
string(1) "C"
87
83
}
88
84
[5]=>
89
85
object(ReflectionProperty)#%d (2) {
90
86
["name"]=>
91
- string(8) "pubVirt2"
92
- ["class"]=>
93
- string(1) "C"
94
- }
95
- [6]=>
96
- object(ReflectionProperty)#%d (2) {
97
- ["name"]=>
98
- string(8) "pubVirt3"
87
+ string(8) "hookVirt"
99
88
["class"]=>
100
89
string(1) "C"
101
90
}
102
91
}
103
- Private properties:array(7 ) {
92
+ Private properties:array(4 ) {
104
93
[0]=>
105
94
object(ReflectionProperty)#%d (2) {
106
95
["name"]=>
@@ -129,29 +118,8 @@ Private properties:array(7) {
129
118
["class"]=>
130
119
string(1) "C"
131
120
}
132
- [4]=>
133
- object(ReflectionProperty)#%d (2) {
134
- ["name"]=>
135
- string(9) "privVirt1"
136
- ["class"]=>
137
- string(1) "C"
138
- }
139
- [5]=>
140
- object(ReflectionProperty)#%d (2) {
141
- ["name"]=>
142
- string(9) "privVirt2"
143
- ["class"]=>
144
- string(1) "C"
145
- }
146
- [6]=>
147
- object(ReflectionProperty)#%d (2) {
148
- ["name"]=>
149
- string(9) "privVirt3"
150
- ["class"]=>
151
- string(1) "C"
152
- }
153
121
}
154
- Public or static properties:array(9 ) {
122
+ Public or static properties:array(8 ) {
155
123
[0]=>
156
124
object(ReflectionProperty)#%d (2) {
157
125
["name"]=>
@@ -197,26 +165,19 @@ Public or static properties:array(9) {
197
165
[6]=>
198
166
object(ReflectionProperty)#%d (2) {
199
167
["name"]=>
200
- string(8 ) "pubVirt1 "
168
+ string(10 ) "hookNoVirt "
201
169
["class"]=>
202
170
string(1) "C"
203
171
}
204
172
[7]=>
205
173
object(ReflectionProperty)#%d (2) {
206
174
["name"]=>
207
- string(8) "pubVirt2"
208
- ["class"]=>
209
- string(1) "C"
210
- }
211
- [8]=>
212
- object(ReflectionProperty)#%d (2) {
213
- ["name"]=>
214
- string(8) "pubVirt3"
175
+ string(8) "hookVirt"
215
176
["class"]=>
216
177
string(1) "C"
217
178
}
218
179
}
219
- Private or static properties:array(9 ) {
180
+ Private or static properties:array(6 ) {
220
181
[0]=>
221
182
object(ReflectionProperty)#%d (2) {
222
183
["name"]=>
@@ -259,68 +220,12 @@ Private or static properties:array(9) {
259
220
["class"]=>
260
221
string(1) "C"
261
222
}
262
- [6]=>
263
- object(ReflectionProperty)#%d (2) {
264
- ["name"]=>
265
- string(9) "privVirt1"
266
- ["class"]=>
267
- string(1) "C"
268
- }
269
- [7]=>
270
- object(ReflectionProperty)#%d (2) {
271
- ["name"]=>
272
- string(9) "privVirt2"
273
- ["class"]=>
274
- string(1) "C"
275
- }
276
- [8]=>
277
- object(ReflectionProperty)#%d (2) {
278
- ["name"]=>
279
- string(9) "privVirt3"
280
- ["class"]=>
281
- string(1) "C"
282
- }
283
223
}
284
- Virtual properties:array(6 ) {
224
+ Virtual properties:array(1 ) {
285
225
[0]=>
286
226
object(ReflectionProperty)#%d (2) {
287
227
["name"]=>
288
- string(8) "pubVirt1"
289
- ["class"]=>
290
- string(1) "C"
291
- }
292
- [1]=>
293
- object(ReflectionProperty)#%d (2) {
294
- ["name"]=>
295
- string(8) "pubVirt2"
296
- ["class"]=>
297
- string(1) "C"
298
- }
299
- [2]=>
300
- object(ReflectionProperty)#%d (2) {
301
- ["name"]=>
302
- string(8) "pubVirt3"
303
- ["class"]=>
304
- string(1) "C"
305
- }
306
- [3]=>
307
- object(ReflectionProperty)#%d (2) {
308
- ["name"]=>
309
- string(9) "privVirt1"
310
- ["class"]=>
311
- string(1) "C"
312
- }
313
- [4]=>
314
- object(ReflectionProperty)#%d (2) {
315
- ["name"]=>
316
- string(9) "privVirt2"
317
- ["class"]=>
318
- string(1) "C"
319
- }
320
- [5]=>
321
- object(ReflectionProperty)#%d (2) {
322
- ["name"]=>
323
- string(9) "privVirt3"
228
+ string(8) "hookVirt"
324
229
["class"]=>
325
230
string(1) "C"
326
231
}
0 commit comments