3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $xml = '<ProjectTechnologies> <ProjectTechnology> <Technology> <Name>SQL</Name> </Technology> <Subtechnologies/> </ProjectTechnology> <ProjectTechnology> <Technology> <Name>SQL</Name> </Technology> <Subtechnologies> <Subtechnology> <Name>Mysql</Name> </Subtechnology> </Subtechnologies> </ProjectTechnology> </ProjectTechnologies>'; $doc = new DOMDocument(); $doc->loadXML($xml); $xpath = new DOMXPath($doc); $results = $xpath->query('/ProjectTechnologies/ProjectTechnology'); var_dump($results);
based on ECP8G
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.1
object(DOMNodeList)#5 (1) { ["length"]=> int(2) }