summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/opcache/jit/zend_jit_x86.dasc1
-rw-r--r--ext/opcache/tests/jit/assign_dim_op_001.phpt21
2 files changed, 22 insertions, 0 deletions
diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc
index 6b1f6cf534..3924419560 100644
--- a/ext/opcache/jit/zend_jit_x86.dasc
+++ b/ext/opcache/jit/zend_jit_x86.dasc
@@ -6274,6 +6274,7 @@ static int zend_jit_assign_dim_op(dasm_State **Dst, const zend_op *opline, uint3
}
|9:
+ | FREE_OP opline->op2_type, opline->op2, op2_info, 0, opline
return 1;
}
diff --git a/ext/opcache/tests/jit/assign_dim_op_001.phpt b/ext/opcache/tests/jit/assign_dim_op_001.phpt
new file mode 100644
index 0000000000..256a6d5425
--- /dev/null
+++ b/ext/opcache/tests/jit/assign_dim_op_001.phpt
@@ -0,0 +1,21 @@
+--TEST--
+JIT ASSIGN_DIM_OP: 001
+--INI--
+opcache.enable=1
+opcache.enable_cli=1
+opcache.file_update_protection=0
+opcache.jit_buffer_size=1M
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+$x = "a";
+$a[$x . "b"] = 0;
+$a[$x . "b"] += 2;
+var_dump($a);
+?>
+--EXPECT--
+array(1) {
+ ["ab"]=>
+ int(2)
+}