1--TEST--
2Observer: Basic observability of userland functions
3--EXTENSIONS--
4zend_test
5--INI--
6zend_test.observer.enabled=1
7zend_test.observer.show_output=1
8zend_test.observer.observe_all=1
9opcache.optimization_level=0x7FFFBFFF & ~0x0080
10--FILE--
11<?php
12function bar()
13{
14    echo 'Bar' . PHP_EOL;
15    var_dump(array_sum([1,2,3]));
16}
17
18function foo()
19{
20    echo 'Foo' . PHP_EOL;
21    bar();
22}
23
24foo();
25foo();
26foo();
27
28echo 'DONE' . PHP_EOL;
29?>
30--EXPECTF--
31<!-- init '%s%eobserver_basic_%d.php' -->
32<file '%s%eobserver_basic_%d.php'>
33  <!-- init foo() -->
34  <foo>
35Foo
36    <!-- init bar() -->
37    <bar>
38Bar
39      <!-- init array_sum() -->
40      <array_sum>
41      </array_sum>
42      <!-- init var_dump() -->
43      <var_dump>
44int(6)
45      </var_dump>
46    </bar>
47  </foo>
48  <foo>
49Foo
50    <bar>
51Bar
52      <array_sum>
53      </array_sum>
54      <var_dump>
55int(6)
56      </var_dump>
57    </bar>
58  </foo>
59  <foo>
60Foo
61    <bar>
62Bar
63      <array_sum>
64      </array_sum>
65      <var_dump>
66int(6)
67      </var_dump>
68    </bar>
69  </foo>
70DONE
71</file '%s%eobserver_basic_%d.php'>
72