3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $itunesRss = 'https://itunes.apple.com/us/rss/topalbums/limit=10/explicit=true/xml'; $itunesObj = simplexml_load_file(file_get_contents($itunesRss)); foreach($itunesObj->entry as $record) { echo 'nzbs looking up '.$record['title'].'<br />'; }
Output for 5.5.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/QVkAs on line 4 Warning: file_get_contents(https://itunes.apple.com/us/rss/topalbums/limit=10/explicit=true/xml): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/QVkAs on line 4 Warning: simplexml_load_file(): I/O warning : failed to load external entity "" in /in/QVkAs on line 4 Notice: Trying to get property of non-object in /in/QVkAs on line 6 Warning: Invalid argument supplied for foreach() in /in/QVkAs on line 6
Output for hhvm-3.10.0 - 3.12.0
Warning: Failed to open https://itunes.apple.com/us/rss/topalbums/limit=10/explicit=true/xml (Could not resolve host: itunes.apple.com) in /in/QVkAs on line 4 Warning: No such file or directory in /in/QVkAs on line 4 Notice: Cannot access property on non-object in /in/QVkAs on line 6 Warning: Invalid argument supplied for foreach() in /in/QVkAs on line 8
Output for 5.4.15 - 5.4.45
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/QVkAs on line 4 Warning: file_get_contents(https://itunes.apple.com/us/rss/topalbums/limit=10/explicit=true/xml): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/QVkAs on line 4 Warning: simplexml_load_file(): I/O warning : failed to load external entity "" in /in/QVkAs on line 4 Warning: Invalid argument supplied for foreach() in /in/QVkAs on line 6
Output for 5.3.0 - 5.4.14
Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /in/QVkAs on line 4 Warning: file_get_contents(https://itunes.apple.com/us/rss/topalbums/limit=10/explicit=true/xml): failed to open stream: No such file or directory in /in/QVkAs on line 4 Warning: simplexml_load_file(): I/O warning : failed to load external entity "" in /in/QVkAs on line 4 Warning: Invalid argument supplied for foreach() in /in/QVkAs on line 6
Output for 5.2.3 - 5.2.17
Warning: file_get_contents(https://itunes.apple.com/us/rss/topalbums/limit=10/explicit=true/xml): failed to open stream: No such file or directory in /in/QVkAs on line 4 Warning: simplexml_load_file(): I/O warning : failed to load external entity "" in /in/QVkAs on line 4 Warning: Invalid argument supplied for foreach() in /in/QVkAs on line 6
Output for 5.1.0 - 5.2.2
<br /> <b>Warning</b>: file_get_contents(https://itunes.apple.com/us/rss/topalbums/limit=10/explicit=true/xml) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory in <b>/in/QVkAs</b> on line <b>4</b><br /> <br /> <b>Warning</b>: simplexml_load_file() [<a href='function.simplexml-load-file'>function.simplexml-load-file</a>]: I/O warning : failed to load external entity &quot;&quot; in <b>/in/QVkAs</b> on line <b>4</b><br /> <br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>/in/QVkAs</b> on line <b>6</b><br />
Output for 5.0.0 - 5.0.5
<br /> <b>Warning</b>: file_get_contents(https://itunes.apple.com/us/rss/topalbums/limit=10/explicit=true/xml) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: No such file or directory in <b>/in/QVkAs</b> on line <b>4</b><br /> <br /> <b>Warning</b>: I/O warning : failed to load external entity "" in <b>/in/QVkAs</b> on line <b>4</b><br /> <br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>/in/QVkAs</b> on line <b>6</b><br />
Output for 4.4.5 - 4.4.9
<br /> <b>Fatal error</b>: Call to undefined function: simplexml_load_file() in <b>/in/QVkAs</b> on line <b>4</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.4.4
<br /> <b>Fatal error</b>: Call to undefined function: simplexml_load_file() in <b>/in/QVkAs</b> on line <b>4</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<br /> <b>Fatal error</b>: Call to undefined function: simplexml_load_file() in <b>/in/QVkAs</b> on line <b>4</b><br />