src/Http/Stream.php
public function detach()
    {
        $previous_stream = $this->stream;
        $this->stream = null;
        $this->meta_data = null;

        return $previous_stream;
    }
public function detach()
    {
        $previous_stream = $this->stream;
        $this->stream = null;
        $this->meta_data = null;

        return $previous_stream;
    }
Separates any underlying resources from the stream.
After the stream has been detached, the stream is in an unusable state.

@return resource|null Underlying PHP stream, if any