blob: d34c7f61a482ba07c7973c586dc9de6483d0e48b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--TEST--
ReflectionMethod::getDeclaringClass()
--FILE--
<?php
class A {
function foo() {}
}
class B extends A {
function bar() {}
}
$methodInfo = new ReflectionMethod('B', 'foo');
var_dump($methodInfo->getDeclaringClass());
$methodInfo = new ReflectionMethod('B', 'bar');
var_dump($methodInfo->getDeclaringClass());
?>
--EXPECTF--
object(ReflectionClass)#%d (1) {
["name"]=>
string(1) "A"
}
object(ReflectionClass)#%d (1) {
["name"]=>
string(1) "B"
}
|