3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo 'remote addr: '.$_SERVER['REMOTE_ADDR'].'<br>'; $details = gethostbyaddr($_SERVER['REMOTE_ADDR']). print_r(dns_get_record(gethostbyaddr($_SERVER['REMOTE_ADDR'])),true); echo $details; ?>
Output for 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Warning: Undefined array key "REMOTE_ADDR" in /in/MatBG on line 2 remote addr: <br> Warning: Undefined array key "REMOTE_ADDR" in /in/MatBG on line 3 Deprecated: gethostbyaddr(): Passing null to parameter #1 ($ip) of type string is deprecated in /in/MatBG on line 3 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 3 Warning: Undefined array key "REMOTE_ADDR" in /in/MatBG on line 4 Deprecated: gethostbyaddr(): Passing null to parameter #1 ($ip) of type string is deprecated in /in/MatBG on line 4 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 4 Warning: dns_get_record(): An unexpected server failure occurred. in /in/MatBG on line 4
Output for 8.0.0 - 8.0.30
Warning: Undefined array key "REMOTE_ADDR" in /in/MatBG on line 2 remote addr: <br> Warning: Undefined array key "REMOTE_ADDR" in /in/MatBG on line 3 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 3 Warning: Undefined array key "REMOTE_ADDR" in /in/MatBG on line 4 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 4 Warning: dns_get_record(): An unexpected server failure occurred. in /in/MatBG on line 4
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.31, 7.4.3 - 7.4.33
Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 2 remote addr: <br> Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 3 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 3 Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 4 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 4 Warning: dns_get_record(): An unexpected server failure occurred. in /in/MatBG on line 4
Output for 5.5.21 - 5.5.38, 5.6.5 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.33, 7.2.0 - 7.2.25, 7.3.0 - 7.3.12, 7.4.0
Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 2 remote addr: <br> Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 3 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 3 Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 4 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 4 Warning: dns_get_record(): A temporary server error occurred. in /in/MatBG on line 4
Output for 7.3.32 - 7.3.33
remote addr: <br> Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 3 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 4 Warning: dns_get_record(): An unexpected server failure occurred. in /in/MatBG on line 4
Output for 5.3.2 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.20, 5.6.0 - 5.6.4
Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 2 remote addr: <br> Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 3 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 3 Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 4 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 4 Array ( )
Output for 5.3.1
Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 2 remote addr: <br> Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 3 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 3 Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 4 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 4
Output for 5.3.0
Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 2 remote addr: <br> Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 3 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 3 Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 4 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 4 Warning: dns_get_record(): res_nsend() failed in /in/MatBG on line 4
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17
Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 2 remote addr: <br> Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 3 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 3 Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 4 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 4 Warning: dns_get_record(): res_nsend() failed in /in/MatBG on line 4
Output for 4.4.5 - 4.4.9
Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 2 remote addr: <br> Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 3 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 3 Fatal error: Call to undefined function: dns_get_record() in /in/MatBG on line 4
Process exited with code 255.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.4
Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 2 remote addr: <br> Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 3 Warning: gethostbyaddr(): Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 3 Fatal error: Call to undefined function: dns_get_record() in /in/MatBG on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 2 remote addr: <br> Notice: Undefined index: REMOTE_ADDR in /in/MatBG on line 3 Warning: gethostbyaddr() [http://www.php.net/function.gethostbyaddr]: Address is not a valid IPv4 or IPv6 address in /in/MatBG on line 3 Fatal error: Call to undefined function: dns_get_record() in /in/MatBG on line 4

preferences:
257.11 ms | 402 KiB | 393 Q