- var_dump: documentation ( source)
- simplexml_load_string: documentation ( source)
<?php
$xml = "<kek><uncommented>lol dongs</uncommented><!-- le comment <commented>python did 9/11</commented> --></kek>";
var_dump(simplexml_load_string($xml)->asXml());