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
12function foo()
13{
14    trigger_error('Foo error', E_USER_ERROR);
15}
16
17foo();
18
19echo 'You should not see this.';
20?>
21--EXPECTF--
22<!-- init '%s' -->
23<file '%s'>
24  <!-- init foo() -->
25  <foo>
26    <!-- init trigger_error() -->
27    <trigger_error>
28
29Deprecated: Passing E_USER_ERROR to trigger_error() is deprecated since 8.4, throw an exception or call exit with a string message instead in %s on line %d
30
31Fatal error: Foo error in %s on line %d
32    </trigger_error:NULL>
33  </foo:NULL>
34</file '%s'>
35