File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -2518,7 +2518,7 @@ static zend_always_inline int _zend_update_type_info(
2518
2518
tmp |= MAY_BE_RCN ;
2519
2519
}
2520
2520
}
2521
- if (opline -> opcode != ZEND_QM_ASSIGN ) {
2521
+ if (opline -> opcode == ZEND_COALESCE || opline -> opcode == ZEND_JMP_SET ) {
2522
2522
/* COALESCE and JMP_SET result can't be null */
2523
2523
tmp &= ~MAY_BE_NULL ;
2524
2524
if (opline -> opcode == ZEND_JMP_SET ) {
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ JIT COPY_TMP: 001
3
+ --INI--
4
+ opcache.enable=1
5
+ opcache.enable_cli=1
6
+ opcache.file_update_protection=0
7
+ opcache.jit_buffer_size=1M
8
+ opcache.protect_memory=1
9
+ --FILE--
10
+ <?php
11
+ function test () {
12
+ echo "" ;
13
+ }
14
+
15
+ $ a = [];
16
+ $ a [test ()] ??= 1 ;
17
+ var_dump ($ a );
18
+ ?>
19
+ --EXPECT--
20
+ array(1) {
21
+ [""]=>
22
+ int(1)
23
+ }
You can’t perform that action at this time.
0 commit comments