Added test

This commit is contained in:
Dmitry Stogov 2022-01-10 16:05:40 +03:00
parent b80d30d821
commit 71d6501346

View File

@ -0,0 +1,29 @@
--TEST--
JIT ASSIGN_DIM: 006
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=1M
--FILE--
<?php
function foo($s) {
$s = "123";
for($i = 0; $i < 5; $i++) {
$x = $s[-5] = "x";
}
var_dump($x);
}
foo("123");
?>
--EXPECTF--
Warning: Illegal string offset -5 in %sassign_dim_006.php on line 5
Warning: Illegal string offset -5 in %sassign_dim_006.php on line 5
Warning: Illegal string offset -5 in %sassign_dim_006.php on line 5
Warning: Illegal string offset -5 in %sassign_dim_006.php on line 5
Warning: Illegal string offset -5 in %sassign_dim_006.php on line 5
NULL