src/Http/HttpHeaders.php
public function tryGetFirst($name, &$value): bool
    {
        try {
            $value = $this->get($name)[0];

            return true;
        } catch (OutOfBoundsException $ex) {
            return false;
        }
    }
public function tryGetFirst($name, &$value): bool
    {
        try {
            $value = $this->get($name)[0];

            return true;
        } catch (OutOfBoundsException $ex) {
            return false;
        }
    }
Tries to get the first value of a header

@param mixed $name The name of the header whose value we want
@param mixed $value The value, if it is found
@return bool True if the key exists, otherwise false
@throws RuntimeException Thrown if the key could not be calculated