original_string: protected static function arrayMergeRecursive($array1, $array2)
  	{
  		if ( !is_array($array1) || !is_array($array2) ) {
  			return $array2;
  		}
  
  		foreach ( $array2 as $array2_key => $array2_value ) {
  			if ( isset($array1[$array2_key]) ) {
  				$array1[$array2_key] = self::arrayMergeRecursive($array1[$array2_key], $array2_value);
  			}
  			else {
  				$array1[$array2_key] = $array2_value;
  			}
  		}
  
  		return $array1;
  	}
code: protected static function arrayMergeRecursive($array1, $array2)
  	{
  		if ( !is_array($array1) || !is_array($array2) ) {
  			return $array2;
  		}
  
  		foreach ( $array2 as $array2_key => $array2_value ) {
  			if ( isset($array1[$array2_key]) ) {
  				$array1[$array2_key] = self::arrayMergeRecursive($array1[$array2_key], $array2_value);
  			}
  			else {
  				$array1[$array2_key] = $array2_value;
  			}
  		}
  
  		return $array1;
  	}
code_tokens: protected static function arrayMergeRecursive ( $ array1 , $ array2 ) { if ( ! is_array ( $ array1 ) || ! is_array ( $ array2 ) ) { return $ array2 ; } foreach ( $ array2 as $ array2_key => $ array2_value ) { if ( isset ( $ array1 [ $ array2_key ] ) ) { $ array1 [ $ array2_key ] = self :: arrayMergeRecursive ( $ array1 [ $ array2_key ] , $ array2_value ) ; } else { $ array1 [ $ array2_key ] = $ array2_value ; } } return $ array1 ; }
docstring: Similar to array_merge_recursive but keyed-valued are always overwritten.
  
  Priority goes to the 2nd array.
  
  @param mixed $array1 First array.
  @param mixed $array2 Second array.
  
  @return array
docstring_tokens: Similar to array_merge_recursive but keyed - valued are always overwritten .