title: Going crazy getElementsByTagName not working on PHP 5.3.3
body: <p>I have a very simple code like this: </p>
  
  <pre><code>$dom = new DOMDocument();
  libxml_use_internal_errors(true);
  $dom-&gt;loadHTML($data);
  libxml_clear_errors();
  $dom-&gt;preserveWhiteSpace = false;
  foreach($dom-&gt;getElementsByTagName('img') as $img) {
      // do something here
  }
  </code></pre>
  
  <p>The variable $data contains HTML from a external URL. Ok, if i test this code using my local webserver using PHP 5.3.6 it works and returns ALL img tags in that page, but same code running on another server with PHP 5.3.3 DOESN'T WORK! It doesn't return all img tags from the SAME $data value... it only returns the first 13 images.</p>
  
  <p>I suspect that this has something to do with encoding, may be that some characters in $data have a bad encoding or something, but i don't know how to solve it. There is a known bug on PHP 5.3.3 related to this?</p>