- Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.20
- Parse error: syntax error, unexpected ';' in /in/KLY3E on line 9
Process exited with code 255.
<?php
$data = '<user><prop name="A"><sub name="X"></sub></prop><prop name="B"><sub name="Y"></sub></prop></user>';
$xml = new DomDocument;
$xml->loadXML($data);
$xpath = new DomXpath($xml);
var_dump( $xpath->query('//sub[@name="Y"]');