@@ -3257,20 +3257,30 @@ static zend_always_inline zend_result _zend_update_type_info(
32573257 key_type |= MAY_BE_ARRAY_PACKED ;
32583258 }
32593259 if (t1 & MAY_BE_ARRAY ) {
3260- key_type |= ( MAY_BE_HASH_ONLY (t1 ) || ( t1 & ( MAY_BE_UNDEF | MAY_BE_NULL | MAY_BE_FALSE )) ) ?
3260+ key_type |= MAY_BE_HASH_ONLY (t1 ) ?
32613261 MAY_BE_ARRAY_NUMERIC_HASH : MAY_BE_ARRAY_KEY_LONG ;
32623262 }
32633263 } else {
32643264 if (t2 & (MAY_BE_LONG |MAY_BE_FALSE |MAY_BE_TRUE |MAY_BE_RESOURCE |MAY_BE_DOUBLE )) {
3265- key_type |= (MAY_BE_HASH_ONLY (t1 ) || (t1 & (MAY_BE_UNDEF |MAY_BE_NULL |MAY_BE_FALSE ))) ?
3266- MAY_BE_ARRAY_NUMERIC_HASH : MAY_BE_ARRAY_KEY_LONG ;
3265+ if (t1 & (MAY_BE_UNDEF |MAY_BE_NULL |MAY_BE_FALSE )) {
3266+ key_type |= MAY_BE_ARRAY_PACKED ;
3267+ }
3268+ if (t1 & MAY_BE_ARRAY ) {
3269+ key_type |= MAY_BE_HASH_ONLY (t1 ) ?
3270+ MAY_BE_ARRAY_NUMERIC_HASH : MAY_BE_ARRAY_KEY_LONG ;
3271+ }
32673272 }
32683273 if (t2 & MAY_BE_STRING ) {
32693274 key_type |= MAY_BE_ARRAY_KEY_STRING ;
32703275 if (opline -> op2_type != IS_CONST ) {
32713276 // FIXME: numeric string
3272- key_type |= (MAY_BE_HASH_ONLY (t1 ) || (t1 & (MAY_BE_UNDEF |MAY_BE_NULL |MAY_BE_FALSE ))) ?
3273- MAY_BE_ARRAY_NUMERIC_HASH : MAY_BE_ARRAY_KEY_LONG ;
3277+ if (t1 & (MAY_BE_UNDEF |MAY_BE_NULL |MAY_BE_FALSE )) {
3278+ key_type |= MAY_BE_ARRAY_PACKED ;
3279+ }
3280+ if (t1 & MAY_BE_ARRAY ) {
3281+ key_type |= MAY_BE_HASH_ONLY (t1 ) ?
3282+ MAY_BE_ARRAY_NUMERIC_HASH : MAY_BE_ARRAY_KEY_LONG ;
3283+ }
32743284 }
32753285 }
32763286 if (t2 & (MAY_BE_UNDEF | MAY_BE_NULL )) {
0 commit comments