1--TEST--
2Observer: End handlers fire after a 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
10memory_limit=2M
11--FILE--
12<?php
13function foo()
14{
15    str_repeat('.', 1024 * 1024 * 2); // 2MB
16}
17
18foo();
19
20echo 'You should not see this.';
21?>
22--EXPECTF--
23<!-- init '%s%eobserver_error_%d.php' -->
24<file '%s%eobserver_error_%d.php'>
25  <!-- init foo() -->
26  <foo>
27
28Fatal error: Allowed memory size of 2097152 bytes exhausted%s(tried to allocate %d bytes) in %s on line %d
29  </foo:NULL>
30</file '%s%eobserver_error_%d.php'>
31