src/Map.php
public function get($key, $default = null)
    {
        if (($pair = $this->lookupKey($key))) {
            return $pair->value;
        }

        // Check if a default was provided.
        if (func_num_args() === 1) {
            throw new OutOfBoundsException();
        }

        return $default;
    }
public function get($key, $default = null)
    {
        if (($pair = $this->lookupKey($key))) {
            return $pair->value;
        }

        // Check if a default was provided.
        if (func_num_args() === 1) {
            throw new OutOfBoundsException();
        }

        return $default;
    }
public function get ( $ key , $ default = null ) { if ( ( $ pair = $ this -> lookupKey ( $ key ) ) ) { return $ pair -> value ; } // Check if a default was provided. if ( func_num_args ( ) === 1 ) { throw new OutOfBoundsException ( ) ; } return $ default ; }
Returns the value associated with a key, or an optional default if the
key is not associated with a value.

@param mixed $key
@param mixed $default

@return mixed The associated value or fallback default if provided.

@throws OutOfBoundsException if no default was provided and the key is
not associated with a value.
Returns the value associated with a key or an optional default if the key is not associated with a value .