File tree 2 files changed +22
-0
lines changed
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1942,6 +1942,9 @@ static uint32_t assign_dim_array_result_type(
1942
1942
tmp |= MAY_BE_HASH_ONLY (arr_type ) ? MAY_BE_ARRAY_NUMERIC_HASH : MAY_BE_ARRAY_KEY_LONG ;
1943
1943
} else {
1944
1944
if (dim_type & (MAY_BE_LONG |MAY_BE_FALSE |MAY_BE_TRUE |MAY_BE_RESOURCE |MAY_BE_DOUBLE )) {
1945
+ if (arr_type & (MAY_BE_UNDEF |MAY_BE_NULL |MAY_BE_FALSE )) {
1946
+ tmp |= MAY_BE_ARRAY_PACKED ;
1947
+ }
1945
1948
tmp |= MAY_BE_HASH_ONLY (arr_type ) ? MAY_BE_ARRAY_NUMERIC_HASH : MAY_BE_ARRAY_KEY_LONG ;
1946
1949
}
1947
1950
if (dim_type & MAY_BE_STRING ) {
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Type inference 014: ASSIGN_DIM_OP
3
+ --INI--
4
+ opcache.enable=1
5
+ opcache.enable_cli=1
6
+ opcache.optimization_level=-1
7
+ --FILE--
8
+ <?php
9
+ function y () {
10
+ for (;;){
11
+ $ x [y] &= y;
12
+ $ x = false ;
13
+ $ x ["" ]=y;
14
+ }
15
+ }
16
+ ?>
17
+ DONE
18
+ --EXPECT--
19
+ DONE
You can’t perform that action at this time.
0 commit comments