1--TEST-- 2Observer: non-fatal errors do not fire end handlers prematurely 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 8zend_test.observer.show_return_value=1 9--FILE-- 10<?php 11function foo() 12{ 13 return $this_does_not_exit; // E_WARNING 14} 15 16function main() 17{ 18 foo(); 19 echo 'After error.' . PHP_EOL; 20} 21 22main(); 23 24echo 'Done.' . PHP_EOL; 25?> 26--EXPECTF-- 27<!-- init '%s%eobserver_error_%d.php' --> 28<file '%s%eobserver_error_%d.php'> 29 <!-- init main() --> 30 <main> 31 <!-- init foo() --> 32 <foo> 33 34Warning: Undefined variable $this_does_not_exit in %s on line %d 35 </foo:NULL> 36After error. 37 </main:NULL> 38Done. 39</file '%s%eobserver_error_%d.php'> 40