1--TEST--
2Observer: Basic magic method observability
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
11class MagicTest
12{
13    public function __call($name, $args)
14    {
15        echo '__call()' . PHP_EOL;
16        $this->foo($name);
17    }
18
19    public function foo($name)
20    {
21        echo $name . PHP_EOL;
22    }
23}
24
25$test = new MagicTest();
26$test->foo('test');
27$test->bar();
28
29echo 'DONE' . PHP_EOL;
30?>
31--EXPECTF--
32<!-- init '%s%eobserver_magic_01.php' -->
33<file '%s%eobserver_magic_01.php'>
34  <!-- init MagicTest::foo() -->
35  <MagicTest::foo>
36test
37  </MagicTest::foo>
38  <!-- init MagicTest::__call() -->
39  <MagicTest::__call>
40__call()
41    <MagicTest::foo>
42bar
43    </MagicTest::foo>
44  </MagicTest::__call>
45DONE
46</file '%s%eobserver_magic_01.php'>
47