Skip to content

Response: getReasonPhrase Example

Terry L edited this page Jun 20, 2020 · 3 revisions

Shieldon\Psr7\Message\Response

Extends Message.

getReasonPhrase()

Gets the response reason phrase associated with the status code.

  • return string

Example:

$reasonPhrase = $response->getReasonPhrase();

echo $reasonPhrase
// Outputs: OK
Clone this wiki locally