2009-08-26 17:17:58 +00:00
|
|
|
--TEST--
|
|
|
|
Bug #47254
|
|
|
|
--CREDITS--
|
|
|
|
Sebastian Schürmann
|
|
|
|
sebs@php.net
|
|
|
|
Testfest 2009 Munich
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
class A
|
|
|
|
{
|
2020-02-03 21:52:20 +00:00
|
|
|
protected function a() {}
|
2018-09-16 17:16:42 +00:00
|
|
|
|
2009-08-26 17:17:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class B extends A
|
|
|
|
{
|
2020-02-03 21:52:20 +00:00
|
|
|
public function b() {}
|
2009-08-26 17:17:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
$B = new B();
|
|
|
|
$R = new ReflectionObject($B);
|
|
|
|
$m = $R->getMethods();
|
|
|
|
print_r($m);
|
|
|
|
|
|
|
|
?>
|
2019-01-29 11:14:54 +00:00
|
|
|
--EXPECT--
|
2009-08-26 17:17:58 +00:00
|
|
|
Array
|
|
|
|
(
|
|
|
|
[0] => ReflectionMethod Object
|
|
|
|
(
|
|
|
|
[name] => b
|
|
|
|
[class] => B
|
|
|
|
)
|
|
|
|
|
|
|
|
[1] => ReflectionMethod Object
|
|
|
|
(
|
|
|
|
[name] => a
|
|
|
|
[class] => A
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|