public function extract($file, $target, $delete = false)
    {
        $zip = new \ZipArchive();
        $x = $zip->open($file);
        if ($x === true) {
            $zip->extractTo($target);
            $zip->close();
            if ($delete === true) {
                unlink($file);
            }

            return true;
        }
    }
public function extract($file, $target, $delete = false)
    {
        $zip = new \ZipArchive();
        $x = $zip->open($file);
        if ($x === true) {
            $zip->extractTo($target);
            $zip->close();
            if ($delete === true) {
                unlink($file);
            }

            return true;
        }
    }
public function extract ( $ file , $ target , $ delete = false ) { $ zip = new \ ZipArchive ( ) ; $ x = $ zip -> open ( $ file ) ; if ( $ x === true ) { $ zip -> extractTo ( $ target ) ; $ zip -> close ( ) ; if ( $ delete === true ) { unlink ( $ file ) ; } return true ; } }
Open zip extract zip.

@param (string) $file   file that you want uncompress/open
@param (string) $target where you extract file
@param (bool)   $delete true delete zip file false not delete

@since 1.0.0

@return bool
Open zip extract zip .