title: PHP 5.5 breaks empty() on SimpleXMLElement
body: <p>I have recently updated my PHP from 5.3 to 5.5 and got this bug. </p>
  
  <p>My XML is:</p>
  
  <pre><code>&lt;search-response&gt;
    ...
    ...
    &lt;results-count&gt;12345&lt;/results-count&gt;
  &lt;/search-response&gt;
  </code></pre>
  
  <p>If I check for if $value is empty, it always is. While this worked in PHP 5.3. Did they change something in the <code>empty()</code> method?</p>
  
  <pre><code>$contents = file_get_contents(dirname(__FILE__). '/dummy.xml');
  $xml = new SimpleXMLElement($contents);
  
  function xpath_val($source_xml, $argument_array) {
  
    $result = array();
    foreach($argument_array as $k =&gt; $v){
      $node = $source_xml-&gt;xpath($v[0]); 
  
      if (empty($node)) {
        $value = $node;
      } else {
        $value = $node[0];
      }
  
      if (empty($value)) {
        $nodeval = '';
      } else {
        $nodeval = strval($value);
      }
  
      echo $nodeval;
    }
  }
  $arr = array();
  $arr['info'] = xpath_val($xml,array(
    'count'  =&gt; array('/search-response/results-count','integer')
  ));
  var_dump($arr);
  </code></pre>
  
  <p><strong>edit</strong>
  return $nodeval; instead of echo $nodeval; gives:</p>
  
  <pre><code>array(1) {
    ["info"]=&gt;
    string(0) ""
  }
  </code></pre>