3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $testURL = 'http://validator.w3.org/check?uri=http://forums.phpfreaks.com/topic/169441-get-headers-problems/'; $headers = get_headers($testURL, 1); //echo $headers; var_dump($headers); ?>
Output for 5.2.6 - 7.1.0
Warning: get_headers(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/rBjcG on line 4 Warning: get_headers(http://validator.w3.org/check?uri=http://forums.phpfreaks.com/topic/169441-get-headers-problems/): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/rBjcG on line 4 bool(false)
Output for 5.2.3 - 5.2.5
Warning: get_headers(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /in/rBjcG on line 4 Warning: get_headers(http://validator.w3.org/check?uri=http://forums.phpfreaks.com/topic/169441-get-headers-problems/): failed to open stream: Connection refused in /in/rBjcG on line 4 bool(false)
Output for 5.0.3 - 5.2.2
<br /> <b>Warning</b>: get_headers() [<a href='function.get-headers'>function.get-headers</a>]: php_network_getaddresses: getaddrinfo failed: Name or service not known in <b>/in/rBjcG</b> on line <b>4</b><br /> <br /> <b>Warning</b>: get_headers(http://validator.w3.org/check?uri=http://forums.phpfreaks.com/topic/169441-get-headers-problems/) [<a href='function.get-headers'>function.get-headers</a>]: failed to open stream: Connection refused in <b>/in/rBjcG</b> on line <b>4</b><br /> bool(false)
Output for 5.0.1 - 5.0.2
<br /> <b>Warning</b>: get_headers() [<a href='function.get-headers'>function.get-headers</a>]: php_network_getaddresses: gethostbyname failed in <b>/in/rBjcG</b> on line <b>4</b><br /> <br /> <b>Warning</b>: get_headers(http://validator.w3.org/check?uri=http://forums.phpfreaks.com/topic/169441-get-headers-problems/) [<a href='function.get-headers'>function.get-headers</a>]: failed to open stream: Success in <b>/in/rBjcG</b> on line <b>4</b><br /> bool(false)
Output for 5.0.0
<br /> <b>Warning</b>: get_headers() [<a href='function.get-headers'>function.get-headers</a>]: php_network_getaddresses: gethostbyname failed in <b>/in/rBjcG</b> on line <b>4</b><br /> <br /> <b>Warning</b>: get_headers(http://validator.w3.org/check?uri=http://forums.phpfreaks.com/topic/169441-get-headers-problems/) [<a href='function.get-headers'>function.get-headers</a>]: failed to open stream: Bad file descriptor in <b>/in/rBjcG</b> on line <b>4</b><br /> bool(false)
Output for 4.4.5 - 4.4.9
<br /> <b>Fatal error</b>: Call to undefined function: get_headers() in <b>/in/rBjcG</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: get_headers() in <b>/in/rBjcG</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: get_headers() in <b>/in/rBjcG</b> on line <b>4</b><br />