phasync
Request / hasHeader

Method

Request::hasHeader

Checks if a header exists by the given case-insensitive name.

Description#

public Request::hasHeader(
    $name
): bool

Parameters#

$name
Case-insensitive header field name

Return values#

Returns true if any header names match the given header name using a case-insensitive string comparison. Returns false if no matching header name is found in the message. bool