xref: /php-src/ext/opcache/tests/ssa_bug_005.phpt (revision e9f783fc)
1--TEST--
2Assign elision exception safety: UCALL
3--EXTENSIONS--
4opcache
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