src/Request.php
public function getHeaders() {
        $result = [];

        foreach ($this->env as $key => $value) {
            if (stripos($key, 'HTTP_') === 0 && !str_ends($key, '_RAW')) {
                $headerKey = static::normalizeHeaderName(substr($key, 5));
                $result[$headerKey][] = $value;
            }
        }
        return $result;
    }
public function getHeaders() {
        $result = [];

        foreach ($this->env as $key => $value) {
            if (stripos($key, 'HTTP_') === 0 && !str_ends($key, '_RAW')) {
                $headerKey = static::normalizeHeaderName(substr($key, 5));
                $result[$headerKey][] = $value;
            }
        }
        return $result;
    }
Retrieves all message headers.

@return array Returns an associative array of the message's headers.
Each key represents a header name, and each value is an array of strings.