We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0ef1dfc commit 292d76dCopy full SHA for 292d76d
ext/opcache/Optimizer/zend_inference.c
@@ -2147,7 +2147,7 @@ static uint32_t binary_op_result_type(
2147
case ZEND_BW_AND:
2148
case ZEND_BW_XOR:
2149
if ((t1_type & MAY_BE_STRING) && (t2_type & MAY_BE_STRING)) {
2150
- tmp |= MAY_BE_STRING | MAY_BE_RC1;
+ tmp |= MAY_BE_STRING | MAY_BE_RC1 | MAY_BE_RCN;
2151
}
2152
if ((t1_type & ~MAY_BE_STRING) || (t2_type & ~MAY_BE_STRING)) {
2153
tmp |= MAY_BE_LONG;
ext/opcache/tests/jit/and_001.phpt
@@ -0,0 +1,17 @@
1
+--TEST--
2
+JIT BW_AND: 001 (emty string)
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
+$a = [];
11
+$b = "";
12
+$a["" & $b] *= 3;
13
+?>
14
+DONE
15
+--EXPECTF--
16
+Warning: Undefined array key "" in %sand_001.php on line 4
17
0 commit comments