Home > PHP > Function > > HttpResponse::getHeader()

HttpResponse::getHeader()

HttpResponse::getHeader - Get header

Syntax

static HttpResponse::getHeader (string $name)

Arguments

  • name - specifies the name of the header to read; if empty or omitted, an associative array with all headers will be returned

Description

Get header(s) about to be sent.

Version

PHP PECL pecl_http >= 0.12.0

Return value

Returns either a string containing the value of the header matching name, FALSE on failure, or an associative array with all headers.