You are here

public function XHProfParser::toXML in XHProf 6

Same name and namespace in other branches
  1. 7 XHProfLib/XHProfParser.php \XHProfParser::toXML()

File

XHProfLib/XHProfParser.php, line 19

Class

XHProfParser

Code

public function toXML($totals) {
  $xml = new SimpleXMLElement('<xhprof_data/>');
  array_walk_recursive(array_flip($totals), array(
    $xml,
    'addChild',
  ));
  return $xml
    ->asXML();
}