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