3v4l.org

run code in 300+ PHP versions simultaneously
<?php // set feed URL $url = 'http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.xchange%20where%20pair%20in%20(%22INRUSD%22)&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys'; // read feed into SimpleXML object $sxml = simplexml_load_file($url); // then you can do var_dump($sxml); print_r($sxml); // And now you'll be able to call `$sxml->marketstat->type->buy->volume` as well as other properties. echo $sxml->diagnostics->results->rate id="INRUSD"->Rate; ?>
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected 'id' (T_STRING), expecting ',' or ';' in /in/OWvEE on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /in/OWvEE on line 12
Process exited with code 255.

preferences:
190.72 ms | 1386 KiB | 63 Q