1--TEST-- 2Observer: Observe function and class declarations 3--EXTENSIONS-- 4zend_test 5--INI-- 6zend_test.observer.enabled=1 7zend_test.observer.show_output=1 8zend_test.observer.observe_all=1 9zend_test.observer.observe_declaring=1 10--FILE-- 11<?php 12function foo() 13{ 14 echo "foo\n"; 15} 16 17class A { 18} 19 20class B extends A { 21} 22 23if (time() > 0) { 24 function nested() 25 { 26 } 27 28 class C 29 { 30 } 31 32 class D extends A 33 { 34 } 35} 36 37foo(); 38?> 39--EXPECTF-- 40<!-- declared function 'foo' --> 41<!-- declared class 'a' --> 42<!-- declared class 'b' --> 43<!-- init '%s' --> 44<file '%s'> 45 <!-- init time() --> 46 <time> 47 </time> 48 <!-- declared function 'nested' --> 49 <!-- declared class 'c' --> 50 <!-- declared class 'd' --> 51 <!-- init foo() --> 52 <foo> 53foo 54 </foo> 55</file '%s'> 56