File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -2591,6 +2591,9 @@ static zend_always_inline int _zend_update_type_info(
2591
2591
} else if (opline -> opcode == ZEND_ASSIGN_STATIC_PROP ) {
2592
2592
/* Nothing to do */
2593
2593
} else {
2594
+ if (opline -> opcode == ZEND_ASSIGN_OP && ssa_op -> result_def >= 0 && (tmp & MAY_BE_RC1 )) {
2595
+ tmp |= MAY_BE_RCN ;
2596
+ }
2594
2597
UPDATE_SSA_TYPE (tmp , ssa_op -> op1_def );
2595
2598
}
2596
2599
if (ssa_op -> result_def >= 0 ) {
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ JIT ASSIGN_OP: 007 Arrays merging with return value
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 test () {
11
+ $ a = [];
12
+ for ($ i =0 ; $ i < 2 ; $ i ++) {
13
+ $ a += $ a + $ a += $ a ;
14
+ $ a ['b ' ] += 1 ;
15
+ }
16
+ }
17
+ test ();
18
+ ?>
19
+ DONE
20
+ --EXPECTF--
21
+ Warning: Undefined array key "b" in %sassign_op_007.php on line 6
22
+ DONE
You can’t perform that action at this time.
0 commit comments