3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?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); // And now you'll be able to call `$sxml->marketstat->type->buy->volume` as well as other properties. echo $sxml->results->rate id="INRUSD"->Rate; ?>
Output for 5.4.0 - 5.5.10
Parse error: syntax error, unexpected 'id' (T_STRING), expecting ',' or ';' in /in/AvgG7 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/AvgG7 on line 12
Process exited with code 255.