3v4l.org

run code in 300+ PHP versions simultaneously
<?php function foo(&$http_response_header) { file_get_contents('http://www.google.com'); } $x = null; foo($x); var_dump($x);
Output for 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo for www.google.com failed: System error in /in/QqSZX on line 4 Warning: file_get_contents(http://www.google.com): Failed to open stream: php_network_getaddresses: getaddrinfo for www.google.com failed: System error in /in/QqSZX on line 4 NULL
Output for 8.0.13 - 8.0.30
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/QqSZX on line 4 Warning: file_get_contents(http://www.google.com): Failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/QqSZX on line 4 NULL
Output for 8.0.0 - 8.0.12
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/QqSZX on line 4 Warning: file_get_contents(http://www.google.com): Failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/QqSZX on line 4 NULL
Output for 7.3.32 - 7.3.33, 7.4.26 - 7.4.33
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: System error in /in/QqSZX on line 4 Warning: file_get_contents(http://www.google.com): failed to open stream: php_network_getaddresses: getaddrinfo failed: System error in /in/QqSZX on line 4 NULL
Output for 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.31, 7.4.0 - 7.4.25
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/QqSZX on line 4 Warning: file_get_contents(http://www.google.com): failed to open stream: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /in/QqSZX on line 4 NULL

preferences:
218.6 ms | 403 KiB | 287 Q