xref: /PHP-8.0/Zend/tests/bug49893.phpt (revision f8d79582)
1--TEST--
2Bug #49893 (Crash while creating an instance of Zend_Mail_Storage_Pop3)
3--FILE--
4<?php
5class A {
6    function __destruct() {
7        try {
8            throw new Exception("2");
9        } catch (Exception $e) {
10            echo $e->getMessage() . "\n";
11        }
12    }
13}
14class B {
15    function __construct() {
16        $this->a = new A();
17        throw new Exception("1");
18    }
19}
20try {
21    $b = new B();
22} catch(Exception $e) {
23    echo $e->getMessage() . "\n";
24}
25?>
26--EXPECT--
272
281
29