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