3v4l.org

run code in 300+ PHP versions simultaneously
$xml = <<<XML <?xml version='1.0' encoding='ISO-8859-1'?> <!DOCTYPE markables SYSTEM "markables.dtd"> <markables> <markable id="markable_1" atrib="yes" span="word_1..word_4"> </markable> <markable id="markable_2" atrib="no" span="word_6..word_7"> </markable> <markable id="markable_3" atrib="yes" span="word_10..word_24"> </markable> </markables> XML; <?php $doc = new DOMDocument(); $doc->loadXML($xml); $xp = new DOMXPath($doc); foreach($xp->query('/markables/markable/@atrib[. != "yes"]') as $attrib) { $attrib->nodeValue = 'yes'; } echo $doc->saveXML();

This is an error 404

There are `0` results


preferences:
156.62 ms | 1399 KiB | 7 Q