xref: /PHP-7.1/ext/opcache/tests/ssa_bug_004.phpt (revision a1715229)
1--TEST--
2Assign elision exception safety: ICALL
3--FILE--
4<?php
5
6set_error_handler(function() { throw new Exception; });
7
8function test() {
9    $x = str_replace(['foo'], [[]], ['foo']);
10}
11try {
12    test();
13} catch (Exception $e) {
14    echo "caught\n";
15}
16
17?>
18--EXPECT--
19caught
20