1--TEST--
2ReflectionClass::__toString() - verify 'inherits', 'overwrites' and 'prototype' parts of method representation with private methods
3--CREDITS--
4Robin Fernandes <robinf@php.net>
5Steve Seear <stevseea@php.net>
6--FILE--
7<?php
8Class A {
9	private function f() {}
10}
11Class B extends A {
12	private function f() {}
13}
14Class C extends B {
15
16}
17Class D extends C {
18	private 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> private 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> private 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 [0] {
95  }
96}
97
98
99----( Reflection class D: )----
100Class [ <user> class D extends C ] {
101  @@ %s 11-13
102
103  - Constants [0] {
104  }
105
106  - Static properties [0] {
107  }
108
109  - Static methods [0] {
110  }
111
112  - Properties [0] {
113  }
114
115  - Methods [1] {
116    Method [ <user, overwrites B> private method f ] {
117      @@ %s 12 - 12
118    }
119  }
120}
121