HeadersCollection::getAsString( string $name ): string|null

In this article

Gets header values as a comma-separated string.

Parameters

$namestringrequired
The header name (case-insensitive).

Return

string|null The header values as a comma-separated string or null if not found.

Source

public function getAsString(string $name): ?string
{
    $values = $this->get($name);
    return $values !== null ? implode(', ', $values) : null;
}

Changelog

VersionDescription
0.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.