xref: /PHP-8.4/Zend/tests/bug78898.phpt (revision ee510eed)
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--EXPECTF--
34a
35Deprecated: Use of "parent" in callables is deprecated in %s on line %d
36a
37Deprecated: Use of "parent" in callables is deprecated in %s on line %d
38a
39