summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/ssa_bug_005.phpt
blob: fb373e36b3f56cb085e6a3ecbc57c30409bf1dbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--TEST--
Assign elision exception safety: UCALL
--FILE--
<?php

function test() {
    $dtor = new class { function __destruct() { throw new Exception; } };
    $a = 1;
    return [0, $a];
}

function test2() {
    $x = test();
}

try {
    test2();
} catch (Exception $e) {
    echo "caught\n";
}

?>
--EXPECT--
caught