title: Call to undefined method DOMDocument::createDocumentType()
body: <p>I have the following script snippet. Originally I did not realize to use getElementById that I needed to include createDocumentType, but now I get the error listed above. What am I doing wrong here? Thanks in advance!</p>
  
  <pre><code>...
  $result = curl_exec($ch); //contains some webpage i am grabbing remotely
  
  $dom = new DOMDocument();
  $dom-&gt;createDocumentType('html', '-//W3C//DTD HTML 4.01 Transitional//EN', 'http://www.w3.org/TR/html4/loose.dtd');
  $elements = $dom-&gt;loadHTML($result);
  $e = $elements-&gt;getElementById('1');
  ...
  </code></pre>
  
  <p>Edit: Additional note, I verified the DOM is correct on the remote page.</p>