3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xml = "<root> <parent> <child name='Child1' /> <child name='Child2' /> <subparent> <child name='Child3' /> </subparent> </parent> <child name='Child4' /> </root>"; $xml = new DOMDocument(); $xml->load('$xml'); $htp = $xml->getElementsByTagName('root'); print_r($htp);
based on NHSEd
Output for 5.3.19 - 7.2.0
Warning: DOMDocument::load(): I/O warning : failed to load external entity "/$xml" in /in/gt78d on line 14 DOMNodeList Object ( [length] => 0 )