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 @@ -3673,7 +3673,8 @@ static zend_always_inline zend_result _zend_update_type_info(
3673
3673
tmp &= ~MAY_BE_ARRAY_EMPTY ;
3674
3674
}
3675
3675
}
3676
- if (((tmp & MAY_BE_ARRAY ) && (tmp & MAY_BE_ARRAY_KEY_ANY ))
3676
+ if (!(tmp & MAY_BE_ARRAY )
3677
+ || (tmp & MAY_BE_ARRAY_KEY_ANY )
3677
3678
|| opline -> opcode == ZEND_FETCH_DIM_FUNC_ARG
3678
3679
|| opline -> opcode == ZEND_FETCH_DIM_R
3679
3680
|| 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