facebook/hiphop-php — Issue #474: simple xml parse incompatibilities with empty xml nodes & property_exists
Author: ujwalendu
Created: 2012-01-19 14:43:35+00:00
State: open

If there is an empty xml node inside another node then that empty node does not appear in the properties of its parent.
property_exists is not working correctly, as it always returns false.

```

white

EOF;

$xml = simplexml_load_string($content);

if(property_exists($xml, 'color')) {
echo (string)$xml->color."\n";
} else {
echo "No Color\n";
}

echo "XML Sub element: ".(property_exists($xml->price, "selling") ? "WORKS" : "FAIL")."\n";
var_export($xml->price); echo " \n";
var_export($xml->weight); echo " \n";
```