original_string: public static function keyExists(array $array, $path) : bool
      {
          foreach (explode('.', $path) as $segment) {
              if (! is_array($array) or ! array_key_exists($segment, $array)) {
                  return false;
              }
  
              $array = $array[$segment];
          }
  
          return true;
      }
code: public static function keyExists(array $array, $path) : bool
      {
          foreach (explode('.', $path) as $segment) {
              if (! is_array($array) or ! array_key_exists($segment, $array)) {
                  return false;
              }
  
              $array = $array[$segment];
          }
  
          return true;
      }
code_tokens: public static function keyExists ( array $ array , $ path ) : bool { foreach ( explode ( '.' , $ path ) as $ segment ) { if ( ! is_array ( $ array ) or ! array_key_exists ( $ segment , $ array ) ) { return false ; } $ array = $ array [ $ segment ] ; } return true ; }
docstring: Checks if the given dot-notated key exists in the array.
  
  if (Arr::keyExists($array, 'foo.bar')) {
  // Do something...
  }
  
  @param  array   $array The search array
  @param  mixed   $path  Array path
  @return bool
docstring_tokens: Checks if the given dot - notated key exists in the array .