xref: /PHP-7.4/Zend/tests/bug78898.phpt (revision 6540797f)
1--TEST--
2Bug #78898: call_user_func(['parent', ...]) fails while other succeed
3--FILE--
4<?php
5
6class A
7{
8	protected function _x()
9	{
10		echo "a";
11	}
12
13	public function __call($methodName, array $arguments)
14	{
15		throw new Exception("Unknown method.");
16	}
17}
18
19class B extends A
20{
21	public function x()
22	{
23		parent::_x();
24		call_user_func('parent::_x');
25		call_user_func(['parent', '_x']);
26	}
27}
28
29$b = new B;
30$b->x();
31
32?>
33--EXPECT--
34aaa
35