Skip to content

Commit

Permalink
Added test
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Jan 10, 2022
1 parent b80d30d commit 71d6501
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions ext/opcache/tests/jit/assign_dim_006.phpt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 71d6501

Please sign in to comment.