HttpMessage
PHP Manual

HttpMessage::setResponseCode

(PECL pecl_http >= 0.10.0)

HttpMessage::setResponseCodeSet response code

Description

public bool HttpMessage::setResponseCode ( int $code )

Set the response code of an HTTP Response Message.

Parameters

code

HTTP response code

Return Values

Returns TRUE on success, or FALSE if the message is not of type HttpMessage::TYPE_RESPONSE or the response code is out of range (100-510).


HttpMessage
PHP Manual