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[0]->Rate; ?>
Output for git.master, git.master_jit
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo for query.yahooapis.com failed: System error in /in/fYWIl on line 6 Warning: simplexml_load_file(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): Failed to open stream: php_network_getaddresses: getaddrinfo for query.yahooapis.com failed: System error in /in/fYWIl on line 6 Warning: simplexml_load_file(): I/O warning : failed to load external entity "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" in /in/fYWIl on line 6 bool(false) Warning: Attempt to read property "diagnostics" on bool in /in/fYWIl on line 12 Warning: Attempt to read property "results" on null in /in/fYWIl on line 12 Warning: Attempt to read property "rate" on null in /in/fYWIl on line 12 Warning: Trying to access array offset on value of type null in /in/fYWIl on line 12 Warning: Attempt to read property "Rate" on null in /in/fYWIl on line 12
Output for rfc.property-hooks
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo for query.yahooapis.com failed: System error in /in/fYWIl on line 6 Warning: simplexml_load_file(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): Failed to open stream: php_network_getaddresses: getaddrinfo for query.yahooapis.com failed: System error in /in/fYWIl on line 6 Warning: simplexml_load_file(): I/O warning : failed to load external entity "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" in /in/fYWIl on line 6 bool(false) Warning: Attempt to read property "diagnostics" on false in /in/fYWIl on line 12 Warning: Attempt to read property "results" on null in /in/fYWIl on line 12 Warning: Attempt to read property "rate" on null in /in/fYWIl on line 12 Warning: Trying to access array offset on null in /in/fYWIl on line 12 Warning: Attempt to read property "Rate" on null in /in/fYWIl on line 12

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
49.6 ms | 403 KiB | 8 Q