summaryrefslogtreecommitdiff
path: root/ext/opcache/tests/ssa_bug_005.phpt
blob: 5c5965c1a17e91331ebd9ca3fd43699ce4aaee93 (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
25
26
--TEST--
Assign elision exception safety: UCALL
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--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