title: php remove invalid chars
body: <p>I have the following errors outputed when I work with <code>$dom-&gt;loadHTML('&lt;?xml version="1.0" encoding="UTF-8"?&gt;' . $html);</code>.</p>
  
  <pre><code>Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Char 0xD860 out of allowed range in Entity, line: 1 in D:\xampp\xampp\htdocs\xampp\similarity\functions.php on line 438
  Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Char 0xDEE2 out of allowed range in Entity, line: 1 in D:\xampp\xampp\htdocs\xampp\similarity\functions.php on line 438
  Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: Invalid char in CDATA 0x3 in Entity, line: 1 in D:\xampp\xampp\htdocs\xampp\similarity\functions.php on line 438
  </code></pre>
  
  <p>How do I target and remove those "invalid" charaters using php?</p>
  
  <p>Andrej</p>