xref: /PHP-7.2/ext/opcache/tests/ssa_bug_005.phpt (revision 75bc3446)
1--TEST--
2Assign elision exception safety: UCALL
3--SKIPIF--
4<?php require_once('skipif.inc'); ?>
5--FILE--
6<?php
7
8function test() {
9    $dtor = new class { function __destruct() { throw new Exception; } };
10    $a = 1;
11    return [0, $a];
12}
13
14function test2() {
15    $x = test();
16}
17
18try {
19    test2();
20} catch (Exception $e) {
21    echo "caught\n";
22}
23
24?>
25--EXPECT--
26caught
27