1--TEST--
2ReflectionClass::__toString() - verify 'inherits', 'overwrites' and 'prototype' parts of method representation
3--CREDITS--
4Robin Fernandes <robinf@php.net>
5Steve Seear <stevseea@php.net>
6--FILE--
7<?php
8Class A {
9	function f() {}
10}
11Class B extends A {
12	function f() {}
13}
14Class C extends B {
15
16}
17Class D extends C {
18	function f() {}
19}
20foreach (array('A', 'B', 'C', 'D') as $class) {
21	echo "\n\n----( Reflection class $class: )----\n";
22	$rc = new ReflectionClass($class);
23	echo $rc;
24}
25
26?>
27--EXPECTF--
28
29
30----( Reflection class A: )----
31Class [ <user> class A ] {
32  @@ %s 2-4
33
34  - Constants [0] {
35  }
36
37  - Static properties [0] {
38  }
39
40  - Static methods [0] {
41  }
42
43  - Properties [0] {
44  }
45
46  - Methods [1] {
47    Method [ <user> public method f ] {
48      @@ %s 3 - 3
49    }
50  }
51}
52
53
54----( Reflection class B: )----
55Class [ <user> class B extends A ] {
56  @@ %s 5-7
57
58  - Constants [0] {
59  }
60
61  - Static properties [0] {
62  }
63
64  - Static methods [0] {
65  }
66
67  - Properties [0] {
68  }
69
70  - Methods [1] {
71    Method [ <user, overwrites A, prototype A> public method f ] {
72      @@ %s 6 - 6
73    }
74  }
75}
76
77
78----( Reflection class C: )----
79Class [ <user> class C extends B ] {
80  @@ %s 8-10
81
82  - Constants [0] {
83  }
84
85  - Static properties [0] {
86  }
87
88  - Static methods [0] {
89  }
90
91  - Properties [0] {
92  }
93
94  - Methods [1] {
95    Method [ <user, inherits B, prototype A> public method f ] {
96      @@ %s 6 - 6
97    }
98  }
99}
100
101
102----( Reflection class D: )----
103Class [ <user> class D extends C ] {
104  @@ %s 11-13
105
106  - Constants [0] {
107  }
108
109  - Static properties [0] {
110  }
111
112  - Static methods [0] {
113  }
114
115  - Properties [0] {
116  }
117
118  - Methods [1] {
119    Method [ <user, overwrites B, prototype A> public method f ] {
120      @@ %s 12 - 12
121    }
122  }
123}