1--TEST--
2Observer: call_user_func_array() from root namespace
3--SKIPIF--
4<?php if (!extension_loaded('zend-test')) die('skip: zend-test extension required'); ?>
5--INI--
6zend_test.observer.enabled=1
7zend_test.observer.observe_all=1
8--FILE--
9<?php
10namespace Test {
11    final class MyClass
12    {
13        public static function myMethod(string $msg)
14        {
15            echo 'MyClass::myMethod ' . $msg . PHP_EOL;
16        }
17    }
18
19    function my_function(string $msg)
20    {
21        echo 'my_function ' . $msg . PHP_EOL;
22    }
23}
24namespace {
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%eobserver_call_user_func_%d.php' -->
31<file '%s%eobserver_call_user_func_%d.php'>
32  <!-- init Test\MyClass::myMethod() -->
33  <Test\MyClass::myMethod>
34MyClass::myMethod called
35  </Test\MyClass::myMethod>
36  <!-- init Test\my_function() -->
37  <Test\my_function>
38my_function called
39  </Test\my_function>
40</file '%s%eobserver_call_user_func_%d.php'>
41