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----( Reflection class A: )----
29Class [ <user> class A ] {
30  @@ %s 2-4
31
32  - Constants [0] {
33  }
34
35  - Static properties [0] {
36  }
37
38  - Static methods [0] {
39  }
40
41  - Properties [0] {
42  }
43
44  - Methods [1] {
45    Method [ <user> public method f ] {
46      @@ %s 3 - 3
47    }
48  }
49}
50
51
52----( Reflection class B: )----
53Class [ <user> class B extends A ] {
54  @@ %s 5-7
55
56  - Constants [0] {
57  }
58
59  - Static properties [0] {
60  }
61
62  - Static methods [0] {
63  }
64
65  - Properties [0] {
66  }
67
68  - Methods [1] {
69    Method [ <user, overwrites A, prototype A> public method f ] {
70      @@ %s 6 - 6
71    }
72  }
73}
74
75
76----( Reflection class C: )----
77Class [ <user> class C extends B ] {
78  @@ %s 8-10
79
80  - Constants [0] {
81  }
82
83  - Static properties [0] {
84  }
85
86  - Static methods [0] {
87  }
88
89  - Properties [0] {
90  }
91
92  - Methods [1] {
93    Method [ <user, inherits B, prototype A> public method f ] {
94      @@ %s 6 - 6
95    }
96  }
97}
98
99
100----( Reflection class D: )----
101Class [ <user> class D extends C ] {
102  @@ %s 11-13
103
104  - Constants [0] {
105  }
106
107  - Static properties [0] {
108  }
109
110  - Static methods [0] {
111  }
112
113  - Properties [0] {
114  }
115
116  - Methods [1] {
117    Method [ <user, overwrites B, prototype A> public method f ] {
118      @@ %s 12 - 12
119    }
120  }
121}
122