To Unzip a zip file in PHP :
PHP has built-in extensions for unzipping the compressed files. We can make use of ZipArchive for to unzip a file.

Example :

 <?php

// file to unzip
$file = "file.zip";

$zip = new ZipArchive;
$res = $zip->open($file);
if ($res === TRUE)
{
  // extract the unzip file to given path
  $zip->extractTo("/myzips/extract_path/");
  $zip->close();
  echo "Unzip Successful!";
}
else
{
  echo "Unzip unsuccessful!!! - Unable to open the file";
}

?>

  /*

  Output :

  Unzip Successful!

  */