public static function exists($array, $key)
    {
        $key = static::normalizeKey($key);

        if ($key === null || $key === '' || static::isEmpty($array))
        {
            return false;
        }

        $keys = explode('.', $key);
        $currentElement = $array;

        foreach ($keys as $currentKey)
        {
            if (!is_array($currentElement) || !array_key_exists($currentKey, $currentElement))
            {
                return false;
            }

            $currentElement = $currentElement[(string) $currentKey];
        }

        return true;
    }
public static function exists($array, $key)
    {
        $key = static::normalizeKey($key);

        if ($key === null || $key === '' || static::isEmpty($array))
        {
            return false;
        }

        $keys = explode('.', $key);
        $currentElement = $array;

        foreach ($keys as $currentKey)
        {
            if (!is_array($currentElement) || !array_key_exists($currentKey, $currentElement))
            {
                return false;
            }

            $currentElement = $currentElement[(string) $currentKey];
        }

        return true;
    }
public static function exists ( $ array , $ key ) { $ key = static :: normalizeKey ( $ key ) ; if ( $ key === null || $ key === '' || static :: isEmpty ( $ array ) ) { return false ; } $ keys = explode ( '.' , $ key ) ; $ currentElement = $ array ; foreach ( $ keys as $ currentKey ) { if ( ! is_array ( $ currentElement ) || ! array_key_exists ( $ currentKey , $ currentElement ) ) { return false ; } $ currentElement = $ currentElement [ ( string ) $ currentKey ] ; } return true ; }
Check if given key exists in array with dot notation support.

@param array $array
@param string $key
@return bool
Check if given key exists in array with dot notation support .