Response::__clone()

In this article

Creates a deep clone of this response.

Description

Clones the headers collection to ensure the cloned response is independent of the original.

Source

public function __clone()
{
    // Clone headers collection
    $this->headers = clone $this->headers;
}

Changelog

VersionDescription
0.4.2Introduced.

User Contributed Notes

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