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

                $arr = $arr[$key];
            }

            return $arr;
        }

        return array_key_exists($key, $arr) ? $arr[$key] : $default;
    }
public static function get($arr, $key, $default = null)
    {
        if (strpos($key, '.') !== false && count(($keys = explode('.', $key)))) {
            foreach ($keys as $key) {
                if (!array_key_exists($key, $arr)) {
                    return $default;
                }

                $arr = $arr[$key];
            }

            return $arr;
        }

        return array_key_exists($key, $arr) ? $arr[$key] : $default;
    }
Returns he value of $key if found in $arr or $default

@param array       $arr
@param string      $key
@param null|mixed  $default

@return mixed