1--TEST--
2Observer: call_user_func_array() from namespace
3--EXTENSIONS--
4zend_test
5--INI--
6zend_test.observer.enabled=1
7zend_test.observer.show_output=1
8zend_test.observer.observe_all=1
9--FILE--
10<?php
11namespace Test {
12    final class MyClass
13    {
14        public static function myMethod(string $msg)
15        {
16            echo 'MyClass::myMethod ' . $msg . PHP_EOL;
17        }
18    }
19
20    function my_function(string $msg)
21    {
22        echo 'my_function ' . $msg . PHP_EOL;
23    }
24
25    call_user_func_array('Test\\MyClass::myMethod', ['called']);
26    call_user_func_array('Test\\my_function', ['called']);
27}
28?>
29--EXPECTF--
30<!-- init '%s' -->
31<file '%s'>
32  <!-- init call_user_func_array() -->
33  <call_user_func_array>
34    <!-- init Test\MyClass::myMethod() -->
35    <Test\MyClass::myMethod>
36MyClass::myMethod called
37    </Test\MyClass::myMethod>
38  </call_user_func_array>
39  <call_user_func_array>
40    <!-- init Test\my_function() -->
41    <Test\my_function>
42my_function called
43    </Test\my_function>
44  </call_user_func_array>
45</file '%s'>
46