public static function get($array, $key, $default = null)
    {
        $key = static::normalizeKey($key);

        if ($key === null || $key === '')
        {
            return $array;
        }

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

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

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

        return $currentElement;
    }
public static function get($array, $key, $default = null)
    {
        $key = static::normalizeKey($key);

        if ($key === null || $key === '')
        {
            return $array;
        }

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

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

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

        return $currentElement;
    }
public static function get ( $ array , $ key , $ default = null ) { $ key = static :: normalizeKey ( $ key ) ; if ( $ key === null || $ key === '' ) { return $ array ; } $ keys = explode ( '.' , $ key ) ; $ currentElement = $ array ; foreach ( $ keys as $ currentKey ) { if ( ! is_array ( $ currentElement ) || ! array_key_exists ( $ currentKey , $ currentElement ) ) { return $ default ; } $ currentElement = $ currentElement [ ( string ) $ currentKey ] ; } return $ currentElement ; }
Return the value stored under given key in the array with dot notation support.

@param string $key
@param array $array
@param mixed $default
@return mixed
Return the value stored under given key in the array with dot notation support .