title: Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ';' in Entity,
body: <pre><code>$html = file_get_contents("http://www.somesite.com/");
  
  $dom = new DOMDocument();
  $dom-&gt;loadHTML($html);
  
  echo $dom;
  </code></pre>
  
  <p>throws</p>
  
  <pre><code>Warning: DOMDocument::loadHTML(): htmlParseEntityRef: expecting ';' in Entity,
  Catchable fatal error: Object of class DOMDocument could not be converted to string in test.php on line 10
  </code></pre>