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; ?>
Output for 8.3.0 - 8.3.6
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo for query.yahooapis.com failed: System error in /in/CGouK 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/CGouK 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/CGouK on line 6 bool(false) Warning: Attempt to read property "diagnostics" on false in /in/CGouK on line 12 Warning: Attempt to read property "results" on null in /in/CGouK on line 12 Warning: Attempt to read property "Rate" on null in /in/CGouK on line 12
Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.18
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo for query.yahooapis.com failed: System error in /in/CGouK 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/CGouK 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/CGouK on line 6 bool(false) Warning: Attempt to read property "diagnostics" on bool in /in/CGouK on line 12 Warning: Attempt to read property "results" on null in /in/CGouK on line 12 Warning: Attempt to read property "Rate" on null in /in/CGouK on line 12
Output for 8.0.13 - 8.0.30
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: System error in /in/CGouK 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 failed: System error in /in/CGouK 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/CGouK on line 6 bool(false) Warning: Attempt to read property "diagnostics" on bool in /in/CGouK on line 12 Warning: Attempt to read property "results" on null in /in/CGouK on line 12 Warning: Attempt to read property "Rate" on null in /in/CGouK on line 12
Output for 8.0.0 - 8.0.12
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/CGouK 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 failed: Temporary failure in name resolution in /in/CGouK 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/CGouK on line 6 bool(false) Warning: Attempt to read property "diagnostics" on bool in /in/CGouK on line 12 Warning: Attempt to read property "results" on null in /in/CGouK on line 12 Warning: Attempt to read property "Rate" on null in /in/CGouK on line 12
Output for 7.2.0 - 7.2.25, 7.3.0 - 7.3.12, 7.4.0, 7.4.26 - 7.4.33
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: System error in /in/CGouK 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 failed: System error in /in/CGouK 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/CGouK on line 6 bool(false) Notice: Trying to get property 'diagnostics' of non-object in /in/CGouK on line 12 Notice: Trying to get property 'results' of non-object in /in/CGouK on line 12 Notice: Trying to get property 'Rate' of non-object in /in/CGouK on line 12
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.31, 7.4.3 - 7.4.25
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/CGouK 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 failed: Temporary failure in name resolution in /in/CGouK 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/CGouK on line 6 bool(false) Notice: Trying to get property 'diagnostics' of non-object in /in/CGouK on line 12 Notice: Trying to get property 'results' of non-object in /in/CGouK on line 12 Notice: Trying to get property 'Rate' of non-object in /in/CGouK on line 12
Output for 7.3.32 - 7.3.33
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: System error in /in/CGouK 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 failed: System error in /in/CGouK 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/CGouK on line 6 bool(false)
Output for 7.0.20, 7.1.5 - 7.1.33
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: System error in /in/CGouK 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 failed: System error in /in/CGouK 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/CGouK on line 6 bool(false) Notice: Trying to get property of non-object in /in/CGouK on line 12 Notice: Trying to get property of non-object in /in/CGouK on line 12 Notice: Trying to get property of non-object in /in/CGouK on line 12
Output for 5.2.6 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.14, 7.1.0
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/CGouK 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 failed: Name or service not known in /in/CGouK 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/CGouK on line 6 bool(false) Notice: Trying to get property of non-object in /in/CGouK on line 12 Notice: Trying to get property of non-object in /in/CGouK on line 12 Notice: Trying to get property of non-object in /in/CGouK on line 12
Output for 5.1.0 - 5.1.6, 5.2.0 - 5.2.5
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/CGouK 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: Connection refused in /in/CGouK 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/CGouK on line 6 bool(false) Notice: Trying to get property of non-object in /in/CGouK on line 12 Notice: Trying to get property of non-object in /in/CGouK on line 12 Notice: Trying to get property of non-object in /in/CGouK on line 12
Output for 5.0.3 - 5.0.5
Warning: simplexml_load_file(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/CGouK on line 6 Warning: simplexml_load_file(http://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.xchange where pair in ("INRUSD")&diagnostics=true&env=store://datatables.org/alltableswithkeys): failed to open stream: Connection refused in /in/CGouK on line 6 Warning: connection refusedI/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/CGouK on line 6 bool(false) Notice: Trying to get property of non-object in /in/CGouK on line 12 Notice: Trying to get property of non-object in /in/CGouK on line 12 Notice: Trying to get property of non-object in /in/CGouK on line 12
Output for 5.0.1 - 5.0.2
Warning: simplexml_load_file(): php_network_getaddresses: gethostbyname failed in /in/CGouK on line 6 Warning: simplexml_load_file(http://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.xchange where pair in ("INRUSD")&diagnostics=true&env=store://datatables.org/alltableswithkeys): failed to open stream: Success in /in/CGouK on line 6 Warning: connection refusedI/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/CGouK on line 6 bool(false) Notice: Trying to get property of non-object in /in/CGouK on line 12 Notice: Trying to get property of non-object in /in/CGouK on line 12 Notice: Trying to get property of non-object in /in/CGouK on line 12
Output for 5.0.0
Warning: simplexml_load_file(): php_network_getaddresses: gethostbyname failed in /in/CGouK on line 6 Warning: simplexml_load_file(http://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.xchange where pair in ("INRUSD")&diagnostics=true&env=store://datatables.org/alltableswithkeys): failed to open stream: Bad file descriptor in /in/CGouK on line 6 Warning: connection refusedI/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/CGouK on line 6 bool(false) Notice: Trying to get property of non-object in /in/CGouK on line 12 Notice: Trying to get property of non-object in /in/CGouK on line 12 Notice: Trying to get property of non-object in /in/CGouK on line 12
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: simplexml_load_file() in /in/CGouK on line 6
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Fatal error: Call to undefined function: simplexml_load_file() in /in/CGouK on line 6
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: simplexml_load_file() in /in/CGouK on line 6

preferences:
232.02 ms | 401 KiB | 400 Q