3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function foo(&$http_response_header) { file_get_contents('http://www.example.com'); } $x = null; foo($x); var_dump($x);
Output for 5.6.0 - 5.6.30, 7.0.0 - 7.2.6
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/k7e5N on line 4 Warning: file_get_contents(http://www.example.com): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/k7e5N on line 4 NULL
Output for hhvm-3.15.4
Warning: Failed to open http://www.example.com (Could not resolve host: www.example.com) in /in/k7e5N on line 4 NULL