Skip to content

Commit 71d6501

Browse files
committed
Added test
1 parent b80d30d commit 71d6501

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
--TEST--
2+
JIT ASSIGN_DIM: 006
3+
--INI--
4+
opcache.enable=1
5+
opcache.enable_cli=1
6+
opcache.file_update_protection=0
7+
opcache.jit_buffer_size=1M
8+
--FILE--
9+
<?php
10+
function foo($s) {
11+
$s = "123";
12+
for($i = 0; $i < 5; $i++) {
13+
$x = $s[-5] = "x";
14+
}
15+
var_dump($x);
16+
}
17+
foo("123");
18+
?>
19+
--EXPECTF--
20+
Warning: Illegal string offset -5 in %sassign_dim_006.php on line 5
21+
22+
Warning: Illegal string offset -5 in %sassign_dim_006.php on line 5
23+
24+
Warning: Illegal string offset -5 in %sassign_dim_006.php on line 5
25+
26+
Warning: Illegal string offset -5 in %sassign_dim_006.php on line 5
27+
28+
Warning: Illegal string offset -5 in %sassign_dim_006.php on line 5
29+
NULL

0 commit comments

Comments
 (0)