source: src/router/php7/ext/opcache/tests/ssa_bug_005.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 6 weeks ago

update php

File size: 319 bytes
Line 
1--TEST--
2Assign elision exception safety: UCALL
3--FILE--
4<?php
5
6function test() {
7    $dtor = new class { function __destruct() { throw new Exception; } };
8    $a = 1;
9    return [0, $a];
10}
11
12function test2() {
13    $x = test();
14}
15
16try {
17    test2();
18} catch (Exception $e) {
19    echo "caught\n";
20}
21
22?>
23--EXPECT--
24caught
Note: See TracBrowser for help on using the repository browser.