1--TEST--
2ReflectionClass::__toString()
3--CREDITS--
4Robin Fernandes <robinf@php.net>
5Steve Seear <stevseea@php.net>
6--FILE--
7<?php
8$rc = new ReflectionClass("ReflectionClass");
9echo $rc;
10?>
11--EXPECT--
12Class [ <internal:Reflection> class ReflectionClass implements Stringable, Reflector ] {
13
14  - Constants [6] {
15    Constant [ public int IS_IMPLICIT_ABSTRACT ] { 16 }
16    Constant [ public int IS_EXPLICIT_ABSTRACT ] { 64 }
17    Constant [ public int IS_FINAL ] { 32 }
18    Constant [ public int IS_READONLY ] { 65536 }
19    Constant [ public int SKIP_INITIALIZATION_ON_SERIALIZE ] { 8 }
20    Constant [ public int SKIP_DESTRUCTOR ] { 16 }
21  }
22
23  - Static properties [0] {
24  }
25
26  - Static methods [0] {
27  }
28
29  - Properties [1] {
30    Property [ public string $name ]
31  }
32
33  - Methods [64] {
34    Method [ <internal:Reflection> private method __clone ] {
35
36      - Parameters [0] {
37      }
38      - Return [ void ]
39    }
40
41    Method [ <internal:Reflection, ctor> public method __construct ] {
42
43      - Parameters [1] {
44        Parameter #0 [ <required> object|string $objectOrClass ]
45      }
46    }
47
48    Method [ <internal:Reflection, prototype Stringable> public method __toString ] {
49
50      - Parameters [0] {
51      }
52      - Return [ string ]
53    }
54
55    Method [ <internal:Reflection> public method getName ] {
56
57      - Parameters [0] {
58      }
59      - Tentative return [ string ]
60    }
61
62    Method [ <internal:Reflection> public method isInternal ] {
63
64      - Parameters [0] {
65      }
66      - Tentative return [ bool ]
67    }
68
69    Method [ <internal:Reflection> public method isUserDefined ] {
70
71      - Parameters [0] {
72      }
73      - Tentative return [ bool ]
74    }
75
76    Method [ <internal:Reflection> public method isAnonymous ] {
77
78      - Parameters [0] {
79      }
80      - Tentative return [ bool ]
81    }
82
83    Method [ <internal:Reflection> public method isInstantiable ] {
84
85      - Parameters [0] {
86      }
87      - Tentative return [ bool ]
88    }
89
90    Method [ <internal:Reflection> public method isCloneable ] {
91
92      - Parameters [0] {
93      }
94      - Tentative return [ bool ]
95    }
96
97    Method [ <internal:Reflection> public method getFileName ] {
98
99      - Parameters [0] {
100      }
101      - Tentative return [ string|false ]
102    }
103
104    Method [ <internal:Reflection> public method getStartLine ] {
105
106      - Parameters [0] {
107      }
108      - Tentative return [ int|false ]
109    }
110
111    Method [ <internal:Reflection> public method getEndLine ] {
112
113      - Parameters [0] {
114      }
115      - Tentative return [ int|false ]
116    }
117
118    Method [ <internal:Reflection> public method getDocComment ] {
119
120      - Parameters [0] {
121      }
122      - Tentative return [ string|false ]
123    }
124
125    Method [ <internal:Reflection> public method getConstructor ] {
126
127      - Parameters [0] {
128      }
129      - Tentative return [ ?ReflectionMethod ]
130    }
131
132    Method [ <internal:Reflection> public method hasMethod ] {
133
134      - Parameters [1] {
135        Parameter #0 [ <required> string $name ]
136      }
137      - Tentative return [ bool ]
138    }
139
140    Method [ <internal:Reflection> public method getMethod ] {
141
142      - Parameters [1] {
143        Parameter #0 [ <required> string $name ]
144      }
145      - Tentative return [ ReflectionMethod ]
146    }
147
148    Method [ <internal:Reflection> public method getMethods ] {
149
150      - Parameters [1] {
151        Parameter #0 [ <optional> ?int $filter = null ]
152      }
153      - Tentative return [ array ]
154    }
155
156    Method [ <internal:Reflection> public method hasProperty ] {
157
158      - Parameters [1] {
159        Parameter #0 [ <required> string $name ]
160      }
161      - Tentative return [ bool ]
162    }
163
164    Method [ <internal:Reflection> public method getProperty ] {
165
166      - Parameters [1] {
167        Parameter #0 [ <required> string $name ]
168      }
169      - Tentative return [ ReflectionProperty ]
170    }
171
172    Method [ <internal:Reflection> public method getProperties ] {
173
174      - Parameters [1] {
175        Parameter #0 [ <optional> ?int $filter = null ]
176      }
177      - Tentative return [ array ]
178    }
179
180    Method [ <internal:Reflection> public method hasConstant ] {
181
182      - Parameters [1] {
183        Parameter #0 [ <required> string $name ]
184      }
185      - Tentative return [ bool ]
186    }
187
188    Method [ <internal:Reflection> public method getConstants ] {
189
190      - Parameters [1] {
191        Parameter #0 [ <optional> ?int $filter = null ]
192      }
193      - Tentative return [ array ]
194    }
195
196    Method [ <internal:Reflection> public method getReflectionConstants ] {
197
198      - Parameters [1] {
199        Parameter #0 [ <optional> ?int $filter = null ]
200      }
201      - Tentative return [ array ]
202    }
203
204    Method [ <internal:Reflection> public method getConstant ] {
205
206      - Parameters [1] {
207        Parameter #0 [ <required> string $name ]
208      }
209      - Tentative return [ mixed ]
210    }
211
212    Method [ <internal:Reflection> public method getReflectionConstant ] {
213
214      - Parameters [1] {
215        Parameter #0 [ <required> string $name ]
216      }
217      - Tentative return [ ReflectionClassConstant|false ]
218    }
219
220    Method [ <internal:Reflection> public method getInterfaces ] {
221
222      - Parameters [0] {
223      }
224      - Tentative return [ array ]
225    }
226
227    Method [ <internal:Reflection> public method getInterfaceNames ] {
228
229      - Parameters [0] {
230      }
231      - Tentative return [ array ]
232    }
233
234    Method [ <internal:Reflection> public method isInterface ] {
235
236      - Parameters [0] {
237      }
238      - Tentative return [ bool ]
239    }
240
241    Method [ <internal:Reflection> public method getTraits ] {
242
243      - Parameters [0] {
244      }
245      - Tentative return [ array ]
246    }
247
248    Method [ <internal:Reflection> public method getTraitNames ] {
249
250      - Parameters [0] {
251      }
252      - Tentative return [ array ]
253    }
254
255    Method [ <internal:Reflection> public method getTraitAliases ] {
256
257      - Parameters [0] {
258      }
259      - Tentative return [ array ]
260    }
261
262    Method [ <internal:Reflection> public method isTrait ] {
263
264      - Parameters [0] {
265      }
266      - Tentative return [ bool ]
267    }
268
269    Method [ <internal:Reflection> public method isEnum ] {
270
271      - Parameters [0] {
272      }
273      - Return [ bool ]
274    }
275
276    Method [ <internal:Reflection> public method isAbstract ] {
277
278      - Parameters [0] {
279      }
280      - Tentative return [ bool ]
281    }
282
283    Method [ <internal:Reflection> public method isFinal ] {
284
285      - Parameters [0] {
286      }
287      - Tentative return [ bool ]
288    }
289
290    Method [ <internal:Reflection> public method isReadOnly ] {
291
292      - Parameters [0] {
293      }
294      - Return [ bool ]
295    }
296
297    Method [ <internal:Reflection> public method getModifiers ] {
298
299      - Parameters [0] {
300      }
301      - Tentative return [ int ]
302    }
303
304    Method [ <internal:Reflection> public method isInstance ] {
305
306      - Parameters [1] {
307        Parameter #0 [ <required> object $object ]
308      }
309      - Tentative return [ bool ]
310    }
311
312    Method [ <internal:Reflection> public method newInstance ] {
313
314      - Parameters [1] {
315        Parameter #0 [ <optional> mixed ...$args ]
316      }
317      - Tentative return [ object ]
318    }
319
320    Method [ <internal:Reflection> public method newInstanceWithoutConstructor ] {
321
322      - Parameters [0] {
323      }
324      - Tentative return [ object ]
325    }
326
327    Method [ <internal:Reflection> public method newInstanceArgs ] {
328
329      - Parameters [1] {
330        Parameter #0 [ <optional> array $args = [] ]
331      }
332      - Tentative return [ ?object ]
333    }
334
335    Method [ <internal:Reflection> public method newLazyGhost ] {
336
337      - Parameters [2] {
338        Parameter #0 [ <required> callable $initializer ]
339        Parameter #1 [ <optional> int $options = 0 ]
340      }
341      - Return [ object ]
342    }
343
344    Method [ <internal:Reflection> public method newLazyProxy ] {
345
346      - Parameters [2] {
347        Parameter #0 [ <required> callable $factory ]
348        Parameter #1 [ <optional> int $options = 0 ]
349      }
350      - Return [ object ]
351    }
352
353    Method [ <internal:Reflection> public method resetAsLazyGhost ] {
354
355      - Parameters [3] {
356        Parameter #0 [ <required> object $object ]
357        Parameter #1 [ <required> callable $factory ]
358        Parameter #2 [ <optional> int $options = 0 ]
359      }
360      - Return [ void ]
361    }
362
363    Method [ <internal:Reflection> public method resetAsLazyProxy ] {
364
365      - Parameters [3] {
366        Parameter #0 [ <required> object $object ]
367        Parameter #1 [ <required> callable $factory ]
368        Parameter #2 [ <optional> int $options = 0 ]
369      }
370      - Return [ void ]
371    }
372
373    Method [ <internal:Reflection> public method initializeLazyObject ] {
374
375      - Parameters [1] {
376        Parameter #0 [ <required> object $object ]
377      }
378      - Return [ object ]
379    }
380
381    Method [ <internal:Reflection> public method isUninitializedLazyObject ] {
382
383      - Parameters [1] {
384        Parameter #0 [ <required> object $object ]
385      }
386      - Return [ bool ]
387    }
388
389    Method [ <internal:Reflection> public method markLazyObjectAsInitialized ] {
390
391      - Parameters [1] {
392        Parameter #0 [ <required> object $object ]
393      }
394      - Return [ object ]
395    }
396
397    Method [ <internal:Reflection> public method getLazyInitializer ] {
398
399      - Parameters [1] {
400        Parameter #0 [ <required> object $object ]
401      }
402      - Return [ ?callable ]
403    }
404
405    Method [ <internal:Reflection> public method getParentClass ] {
406
407      - Parameters [0] {
408      }
409      - Tentative return [ ReflectionClass|false ]
410    }
411
412    Method [ <internal:Reflection> public method isSubclassOf ] {
413
414      - Parameters [1] {
415        Parameter #0 [ <required> ReflectionClass|string $class ]
416      }
417      - Tentative return [ bool ]
418    }
419
420    Method [ <internal:Reflection> public method getStaticProperties ] {
421
422      - Parameters [0] {
423      }
424      - Tentative return [ array ]
425    }
426
427    Method [ <internal:Reflection> public method getStaticPropertyValue ] {
428
429      - Parameters [2] {
430        Parameter #0 [ <required> string $name ]
431        Parameter #1 [ <optional> mixed $default = <default> ]
432      }
433      - Tentative return [ mixed ]
434    }
435
436    Method [ <internal:Reflection> public method setStaticPropertyValue ] {
437
438      - Parameters [2] {
439        Parameter #0 [ <required> string $name ]
440        Parameter #1 [ <required> mixed $value ]
441      }
442      - Tentative return [ void ]
443    }
444
445    Method [ <internal:Reflection> public method getDefaultProperties ] {
446
447      - Parameters [0] {
448      }
449      - Tentative return [ array ]
450    }
451
452    Method [ <internal:Reflection> public method isIterable ] {
453
454      - Parameters [0] {
455      }
456      - Tentative return [ bool ]
457    }
458
459    Method [ <internal:Reflection> public method isIterateable ] {
460
461      - Parameters [0] {
462      }
463      - Tentative return [ bool ]
464    }
465
466    Method [ <internal:Reflection> public method implementsInterface ] {
467
468      - Parameters [1] {
469        Parameter #0 [ <required> ReflectionClass|string $interface ]
470      }
471      - Tentative return [ bool ]
472    }
473
474    Method [ <internal:Reflection> public method getExtension ] {
475
476      - Parameters [0] {
477      }
478      - Tentative return [ ?ReflectionExtension ]
479    }
480
481    Method [ <internal:Reflection> public method getExtensionName ] {
482
483      - Parameters [0] {
484      }
485      - Tentative return [ string|false ]
486    }
487
488    Method [ <internal:Reflection> public method inNamespace ] {
489
490      - Parameters [0] {
491      }
492      - Tentative return [ bool ]
493    }
494
495    Method [ <internal:Reflection> public method getNamespaceName ] {
496
497      - Parameters [0] {
498      }
499      - Tentative return [ string ]
500    }
501
502    Method [ <internal:Reflection> public method getShortName ] {
503
504      - Parameters [0] {
505      }
506      - Tentative return [ string ]
507    }
508
509    Method [ <internal:Reflection> public method getAttributes ] {
510
511      - Parameters [2] {
512        Parameter #0 [ <optional> ?string $name = null ]
513        Parameter #1 [ <optional> int $flags = 0 ]
514      }
515      - Return [ array ]
516    }
517  }
518}
519