xref: /PHP-7.2/Zend/tests/bug36268.phpt (revision e97d5fab)
1--TEST--
2Bug #36268 (Object destructors called even after fatal errors)
3--FILE--
4<?php
5class Foo {
6	function __destruct() {
7		echo "Ha!\n";
8	}
9}
10$x = new Foo();
11bar();
12?>
13--EXPECTF--
14Fatal error: Uncaught Error: Call to undefined function bar() in %sbug36268.php:8
15Stack trace:
16#0 {main}
17  thrown in %sbug36268.php on line 8
18