xref: /PHP-8.1/ext/opcache/tests/ssa_bug_004.phpt (revision e9f783fc)
1--TEST--
2Assign elision exception safety: ICALL
3--EXTENSIONS--
4opcache
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