src/Tar.php
public function getArchive()
    {
        $this->close();

        if ($this->comptype === Archive::COMPRESS_AUTO) {
            $this->comptype = Archive::COMPRESS_NONE;
        }

        if ($this->comptype === Archive::COMPRESS_GZIP) {
            return gzencode($this->memory, $this->complevel);
        }
        if ($this->comptype === Archive::COMPRESS_BZIP) {
            return bzcompress($this->memory);
        }
        return $this->memory;
    }
public function getArchive()
    {
        $this->close();

        if ($this->comptype === Archive::COMPRESS_AUTO) {
            $this->comptype = Archive::COMPRESS_NONE;
        }

        if ($this->comptype === Archive::COMPRESS_GZIP) {
            return gzencode($this->memory, $this->complevel);
        }
        if ($this->comptype === Archive::COMPRESS_BZIP) {
            return bzcompress($this->memory);
        }
        return $this->memory;
    }
public function getArchive ( ) { $ this -> close ( ) ; if ( $ this -> comptype === Archive :: COMPRESS_AUTO ) { $ this -> comptype = Archive :: COMPRESS_NONE ; } if ( $ this -> comptype === Archive :: COMPRESS_GZIP ) { return gzencode ( $ this -> memory , $ this -> complevel ) ; } if ( $ this -> comptype === Archive :: COMPRESS_BZIP ) { return bzcompress ( $ this -> memory ) ; } return $ this -> memory ; }
Returns the created in-memory archive data

This implicitly calls close() on the Archive
@throws ArchiveIOException
Returns the created in - memory archive data