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----( 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> private 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> private 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 [0] {
93  }
94}
95
96
97----( Reflection class D: )----
98Class [ <user> class D extends C ] {
99  @@ %s 11-13
100
101  - Constants [0] {
102  }
103
104  - Static properties [0] {
105  }
106
107  - Static methods [0] {
108  }
109
110  - Properties [0] {
111  }
112
113  - Methods [1] {
114    Method [ <user> private method f ] {
115      @@ %s 12 - 12
116    }
117  }
118}
119