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
9--FILE--
10<?php
11function bar()
12{
13    echo 'Bar' . PHP_EOL;
14    var_dump(array_sum([1,2,3]));
15}
16
17function foo()
18{
19    echo 'Foo' . PHP_EOL;
20    bar();
21}
22
23foo();
24foo();
25foo();
26
27echo 'DONE' . PHP_EOL;
28?>
29--EXPECTF--
30<!-- init '%s%eobserver_basic_01.php' -->
31<file '%s%eobserver_basic_01.php'>
32  <!-- init foo() -->
33  <foo>
34Foo
35    <!-- init bar() -->
36    <bar>
37Bar
38int(6)
39    </bar>
40  </foo>
41  <foo>
42Foo
43    <bar>
44Bar
45int(6)
46    </bar>
47  </foo>
48  <foo>
49Foo
50    <bar>
51Bar
52int(6)
53    </bar>
54  </foo>
55DONE
56</file '%s%eobserver_basic_01.php'>
57