1--TEST--
2Observer: Basic observability of userland methods
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
10class TestClass
11{
12    private function bar()
13    {
14        echo 'Bar' . PHP_EOL;
15        var_dump(array_sum([1,2,3]));
16    }
17
18    public function foo()
19    {
20        echo 'Foo' . PHP_EOL;
21        $this->bar();
22    }
23}
24
25$test = new TestClass();
26$test->foo();
27$test->foo();
28$test->foo();
29
30echo 'DONE' . PHP_EOL;
31?>
32--EXPECTF--
33<!-- init '%s%eobserver_basic_02.php' -->
34<file '%s%eobserver_basic_02.php'>
35  <!-- init TestClass::foo() -->
36  <TestClass::foo>
37Foo
38    <!-- init TestClass::bar() -->
39    <TestClass::bar>
40Bar
41int(6)
42    </TestClass::bar>
43  </TestClass::foo>
44  <TestClass::foo>
45Foo
46    <TestClass::bar>
47Bar
48int(6)
49    </TestClass::bar>
50  </TestClass::foo>
51  <TestClass::foo>
52Foo
53    <TestClass::bar>
54Bar
55int(6)
56    </TestClass::bar>
57  </TestClass::foo>
58DONE
59</file '%s%eobserver_basic_02.php'>
60