mirror of
https://github.com/php/php-src.git
synced 2024-12-17 22:09:12 +08:00
32 lines
334 B
PHP
32 lines
334 B
PHP
--TEST--
|
|
ReflectionMethod::invoke() with base class method
|
|
--FILE--
|
|
<?php
|
|
|
|
class Foo
|
|
{
|
|
function Test()
|
|
{
|
|
echo __METHOD__ . "\n";
|
|
}
|
|
}
|
|
|
|
class Bar extends Foo
|
|
{
|
|
function Test()
|
|
{
|
|
echo __METHOD__ . "\n";
|
|
}
|
|
}
|
|
|
|
$o = new Bar;
|
|
$r = new ReflectionMethod('Foo','Test');
|
|
|
|
$r->invoke($o);
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
Foo::Test
|
|
===DONE===
|