3v4l.org

run code in 300+ PHP versions simultaneously
<?php $xml = <<<XML <Msg> <Txn>submitsms </Txn> <AccountID>123456789</AccountID> <Password>barfoo123</Password> <Message>test message</Message> <RateCode>1</RateCode> <Mobiles> <MobileNo>07123456701</MobileNo> </Mobiles> </Msg> XML; $doc = new DOMDocument(); $doc->loadXML($xml); $xpath = new DOMXPath($doc); var_dump( $xpath->evaluate("string(//AccountID)"), $xpath->evaluate("string(//Password)"), $xpath->evaluate("string(//Message)") );

preferences:
57.62 ms | 402 KiB | 5 Q