facebook/hhvm — pull request #4204 by danslo (2014-11-10 20:37:46+00:00)
Title: implement custom propEmpty logic for SimpleXML

The PHP documentation for empty() says the following:
"That means empty() is essentially the concise equivalent to
!isset($var) || $var == false."

Surprise surprise, SimpleXML doesn't work that way:
$xml = new SimpleXMLElement('');
var_dump(isset($xml->bar)); // true
var_dump((bool)($xml->bar)); // true
var_dump(empty($xml->bar)); // true, wat?!

To solve this, we do the same thing as ObjectData::clone by
defining an HasPropEmpty attribute and checking for it in
ObjectData::propEmpty.