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