title: How to get ZipArchive to not overwrite certain files and folders
body: <p>I would like to extract a zip folder to a location and to replace all files and folders except a few, how can I do this?</p>
  
  <p>I currently do the following.</p>
  
  <pre><code>$backup = realpath('./backup/backup.zip');
  
  $zip = new ZipArchive();
  
  if ($zip-&gt;open("$backup", ZIPARCHIVE::OVERWRITE) !== TRUE) {
  
      die ('Could not open archive');
  
  }
  
  $zip-&gt;extractTo('minus/');
  
  $zip-&gt;close();
  </code></pre>
  
  <p>How can I put conditions in for what files and folders should NOT be replaced? It would be great if some sort of loop could be used.</p>
  
  <p>Thanks all for any help</p>