mirror of
https://github.com/php/php-src.git
synced 2024-12-18 06:21:41 +08:00
35 lines
429 B
PHP
35 lines
429 B
PHP
--TEST--
|
|
Bug #78898: call_user_func(['parent', ...]) fails while other succeed
|
|
--FILE--
|
|
<?php
|
|
|
|
class A
|
|
{
|
|
protected function _x()
|
|
{
|
|
echo "a";
|
|
}
|
|
|
|
public function __call($methodName, array $arguments)
|
|
{
|
|
throw new Exception("Unknown method.");
|
|
}
|
|
}
|
|
|
|
class B extends A
|
|
{
|
|
public function x()
|
|
{
|
|
parent::_x();
|
|
call_user_func('parent::_x');
|
|
call_user_func(['parent', '_x']);
|
|
}
|
|
}
|
|
|
|
$b = new B;
|
|
$b->x();
|
|
|
|
?>
|
|
--EXPECT--
|
|
aaa
|