php-8.0.30-src/ext/opcache/tests/ssa_bug_004.phpt

22 lines
323 B
PHP

--TEST--
Assign elision exception safety: ICALL
--SKIPIF--
<?php require_once('skipif.inc'); ?>
--FILE--
<?php
set_error_handler(function() { throw new Exception; });
function test() {
$x = str_replace(['foo'], [[]], ['foo']);
}
try {
test();
} catch (Exception $e) {
echo "caught\n";
}
?>
--EXPECT--
caught