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