title: unlink returns error on document that's open by DOMDocument
body: <p>I'm trying to unlink XML document after process is done via DOMDocument, but returns an error like below :</p>
  <h3>Error</h3>
  <pre><code>unlink(packageSettings.xml): Resource temporarily unavailable
  </code></pre>
  <p>I've tried below code <code>unsetting</code> that variable like below but not working.</p>
  <h3>Code</h3>
  <pre><code>$xslDoc = new \DOMDocument();
  $xslDoc-&gt;load('/full/path/of/packageSettings.xml');
  $xpath = new DOMXPath($xslDoc);
  // do some operation
  unset($xslDoc);  // I've tried this.
  unlink('/full/path/of/packageSettings.xml'); // this returns above error
  </code></pre>
  <h2>Update : Updated the typo on <code>unlink</code> line.</h2>