1--TEST-- 2Observer: End handlers fire after a userland fatal error 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.show_return_value=1 10--FILE-- 11<?php 12set_error_handler(function ($errno, $errstr, $errfile, $errline) { 13 trigger_error('Foo error', E_USER_ERROR); 14}); 15 16function foo() 17{ 18 return $x; // warning 19} 20 21foo(); 22 23echo 'You should not see this.'; 24?> 25--EXPECTF-- 26<!-- init '%s%eobserver_error_%d.php' --> 27<file '%s%eobserver_error_%d.php'> 28 <!-- init foo() --> 29 <foo> 30 <!-- init {closure}() --> 31 <{closure}> 32 33Fatal error: Foo error in %s on line %d 34 </{closure}:NULL> 35 </foo:NULL> 36</file '%s%eobserver_error_%d.php'> 37