original_string: public static function overwrite(array $array1, array $array2) : array
      {
          foreach (array_intersect_key($array2, $array1) as $key => $value) {
              $array1[$key] = $value;
          }
  
          if (func_num_args() > 2) {
              foreach (array_slice(func_get_args(), 2) as $array2) {
                  foreach (array_intersect_key($array2, $array1) as $key => $value) {
                      $array1[$key] = $value;
                  }
              }
          }
  
          return $array1;
      }
code: public static function overwrite(array $array1, array $array2) : array
      {
          foreach (array_intersect_key($array2, $array1) as $key => $value) {
              $array1[$key] = $value;
          }
  
          if (func_num_args() > 2) {
              foreach (array_slice(func_get_args(), 2) as $array2) {
                  foreach (array_intersect_key($array2, $array1) as $key => $value) {
                      $array1[$key] = $value;
                  }
              }
          }
  
          return $array1;
      }
code_tokens: public static function overwrite ( array $ array1 , array $ array2 ) : array { foreach ( array_intersect_key ( $ array2 , $ array1 ) as $ key => $ value ) { $ array1 [ $ key ] = $ value ; } if ( func_num_args ( ) > 2 ) { foreach ( array_slice ( func_get_args ( ) , 2 ) as $ array2 ) { foreach ( array_intersect_key ( $ array2 , $ array1 ) as $ key => $ value ) { $ array1 [ $ key ] = $ value ; } } } return $ array1 ; }
docstring: Overwrites an array with values from input arrays.
  Keys that do not exist in the first array will not be added!
  
  $array1 = array('name' => 'john', 'mood' => 'happy', 'food' => 'bacon');
  $array2 = array('name' => 'jack', 'food' => 'tacos', 'drink' => 'beer');
  
  // Overwrite the values of $array1 with $array2
  $array = Arr::overwrite($array1, $array2);
  
  // The output of $array will now be:
  array('name' => 'jack', 'mood' => 'happy', 'food' => 'tacos')
  
  @param   array   $array1 master array
  @param   array   $array2 input arrays that will overwrite existing values
  @return  array
docstring_tokens: Overwrites an array with values from input arrays . Keys that do not exist in the first array will not be added!