3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php echo 'Hello, world'; echo file_get_contents('http://localhost/');
Output for 4.3.3 - 5.6.28, 7.0.0 - 7.1.0
Hello, world Warning: file_get_contents(http://localhost/): failed to open stream: Connection refused in /in/8pf08 on line 3
Output for hhvm-3.10.0 - 3.12.0
Hello, world Warning: Failed to open http://localhost/ (Failed to connect to localhost port 80: Connection refused) in /in/8pf08 on line 3
Output for 4.3.2
Hello, world Warning: file_get_contents(): php_hostconnect: connect failed in /in/8pf08 on line 3 Warning: file_get_contents(http://localhost/): failed to open stream: Connection refused in /in/8pf08 on line 3
Output for 4.3.0 - 4.3.1
Hello, world Warning: file_get_contents() [http://www.php.net/function.file-get-contents]: php_hostconnect: connect failed in /in/8pf08 on line 3 Warning: file_get_contents(http://localhost/) [http://www.php.net/function.file-get-contents]: failed to create stream: Connection refused in /in/8pf08 on line 3