3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a= file_get_contents("http://localhost:8983/solr/colLIB/select?q=title_eng%3A%22indonesia%22&fq=author%3A%22hermawan%22&wt=xml&indent=true"); $xml=simplexml_load_string($a); foreach($xml->xpath('doc[starts-with(str)]') as $child) { echo $child->str; } ?>
Output for 7.0.0 - 7.1.0
Warning: file_get_contents(http://localhost:8983/solr/colLIB/select?q=title_eng%3A%22indonesia%22&fq=author%3A%22hermawan%22&wt=xml&indent=true): failed to open stream: Connection refused in /in/uguGk on line 2 Fatal error: Uncaught Error: Call to a member function xpath() on boolean in /in/uguGk:4 Stack trace: #0 {main} thrown in /in/uguGk on line 4
Process exited with code 255.
Output for hhvm-3.12.0
Warning: Failed to open http://localhost:8983/solr/colLIB/select?q=title_eng%3A%22indonesia%22&fq=author%3A%22hermawan%22&wt=xml&indent=true (Failed to connect to localhost port 8983: Connection refused) in /in/uguGk on line 2 Fatal error: Uncaught exception 'BadMethodCallException' with message 'Call to a member function xpath() on a non-object (boolean)' in /in/uguGk:4 Stack trace: #0 {main}
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.8 - 5.6.28
Warning: file_get_contents(http://localhost:8983/solr/colLIB/select?q=title_eng%3A%22indonesia%22&fq=author%3A%22hermawan%22&wt=xml&indent=true): failed to open stream: Connection refused in /in/uguGk on line 2 Fatal error: Call to a member function xpath() on boolean in /in/uguGk on line 4
Process exited with code 255.
Output for 5.0.0 - 5.5.35
Warning: file_get_contents(http://localhost:8983/solr/colLIB/select?q=title_eng%3A%22indonesia%22&fq=author%3A%22hermawan%22&wt=xml&indent=true): failed to open stream: Connection refused in /in/uguGk on line 2 Fatal error: Call to a member function xpath() on a non-object in /in/uguGk on line 4
Process exited with code 255.
Output for 4.4.5 - 4.4.9
Warning: file_get_contents(http://localhost:8983/solr/colLIB/select?q=title_eng%3A%22indonesia%22&fq=author%3A%22hermawan%22&wt=xml&indent=true): failed to open stream: Connection refused in /in/uguGk on line 2 Fatal error: Call to undefined function: simplexml_load_string() in /in/uguGk on line 3
Process exited with code 255.
Output for 4.3.3 - 4.4.4
Warning: file_get_contents(http://localhost:8983/solr/colLIB/select?q=title_eng%3A%22indonesia%22&fq=author%3A%22hermawan%22&wt=xml&indent=true): failed to open stream: Connection refused in /in/uguGk on line 2 Fatal error: Call to undefined function: simplexml_load_string() in /in/uguGk on line 3
Process exited with code 255.
Output for 4.3.2
Warning: file_get_contents(): php_hostconnect: connect failed in /in/uguGk on line 2 Warning: file_get_contents(http://localhost:8983/solr/colLIB/select?q=title_eng%3A%22indonesia%22&fq=author%3A%22hermawan%22&wt=xml&indent=true): failed to open stream: Connection refused in /in/uguGk on line 2 Fatal error: Call to undefined function: simplexml_load_string() in /in/uguGk on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Warning: file_get_contents() [http://www.php.net/function.file-get-contents]: php_hostconnect: connect failed in /in/uguGk on line 2 Warning: file_get_contents(http://localhost:8983/solr/colLIB/select?q=title_eng%3A%22indonesia%22&fq=author%3A%22hermawan%22&wt=xml&indent=true) [http://www.php.net/function.file-get-contents]: failed to create stream: Connection refused in /in/uguGk on line 2 Fatal error: Call to undefined function: simplexml_load_string() in /in/uguGk on line 3