src/SelvinOrtiz/Dot/Dot.php
public static function has($arr, $key)
    {
        if (strpos($key, '.') !== false && count(($keys = explode('.', $key)))) {
            foreach ($keys as $key) {
                if (!array_key_exists($key, $arr)) {
                    return false;
                }

                $arr = $arr[$key];
            }

            return true;
        }

        return array_key_exists($key, $arr);
    }
public static function has($arr, $key)
    {
        if (strpos($key, '.') !== false && count(($keys = explode('.', $key)))) {
            foreach ($keys as $key) {
                if (!array_key_exists($key, $arr)) {
                    return false;
                }

                $arr = $arr[$key];
            }

            return true;
        }

        return array_key_exists($key, $arr);
    }
Returns whether or not the $key exists within $arr

@param array  $arr
@param string $key

@return bool