File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -3680,7 +3680,8 @@ static zend_always_inline zend_result _zend_update_type_info(
3680
3680
tmp &= ~MAY_BE_ARRAY_EMPTY ;
3681
3681
}
3682
3682
}
3683
- if (((tmp & MAY_BE_ARRAY ) && (tmp & MAY_BE_ARRAY_KEY_ANY ))
3683
+ if (!(tmp & MAY_BE_ARRAY )
3684
+ || (tmp & MAY_BE_ARRAY_KEY_ANY )
3684
3685
|| opline -> opcode == ZEND_FETCH_DIM_FUNC_ARG
3685
3686
|| opline -> opcode == ZEND_FETCH_DIM_R
3686
3687
|| opline -> opcode == ZEND_FETCH_DIM_IS
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Type inference 024: FETCH_DIM_W
3
+ --INI--
4
+ opcache.enable=1
5
+ opcache.enable_cli=1
6
+ opcache.optimization_level=-1
7
+ --FILE--
8
+ <?php
9
+ function foo () {
10
+ for ($ cnt = 0 ; $ cnt < 6 ; $ cnt ++) {
11
+ $ b = new SplFixedArray (1 );
12
+ $ b [0 ] = $ a ;
13
+ $ g = &$ b [0 ];
14
+ $ b = new SplFixedArray (1 );
15
+ $ b [0 ] = $ b ;
16
+ $ g = &$ b [0 ];
17
+ }
18
+ }
19
+ @foo ();
20
+ ?>
21
+ DONE
22
+ --EXPECT--
23
+ DONE
You can’t perform that action at this time.
0 commit comments