title: Disable warnings when loading non-well-formed HTML by DomDocument (PHP)
body: <p>I need to parse some HTML files, however, they are not well-formed and PHP prints out warnings to. I want to avoid such debugging/warning behavior programatically. Please advise. Thank you!</p>
  
  <p>Code:</p>
  
  <pre><code>// create a DOM document and load the HTML data
  $xmlDoc = new DomDocument;
  // this dumps out the warnings
  $xmlDoc-&gt;loadHTML($fetchResult);
  </code></pre>
  
  <p>This:</p>
  
  <pre><code>@$xmlDoc-&gt;loadHTML($fetchResult)
  </code></pre>
  
  <p>can  suppress the warnings but how can I capture those warnings programatically?</p>