3v4l.org

run code in 300+ PHP versions simultaneously
<?php $whoisserver = "whois.verisign-grs.co"; $domain = "=stackoverflow.com"; $port = 43; $timeout = 10; $fp = @fsockopen($whoisserver, $port, $errno, $errstr, $timeout) or die("Socket Error " . $errno . " - " . $errstr); fputs($fp, $domain . "\r\n"); $out = ""; while(!feof($fp)){ $out .= fgets($fp); } fclose($fp); $res = ""; if((strpos(strtolower($out), "error") === FALSE) && (strpos(strtolower($out), "not allocated") === FALSE)) { $rows = explode("\n", $out); foreach($rows as $row) { $row = trim($row); if(($row != '') && ($row{0} != '#') && ($row{0} != '%')) { $res .= $row."\n"; } } } print $res;
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Array and string offset access syntax with curly braces is no longer supported in /in/u85JO on line 20
Process exited with code 255.
Output for 7.4.0, 7.4.26 - 7.4.33
Deprecated: Array and string offset access syntax with curly braces is deprecated in /in/u85JO on line 20 Deprecated: Array and string offset access syntax with curly braces is deprecated in /in/u85JO on line 20 Socket Error 0 - php_network_getaddresses: getaddrinfo failed: System error
Output for 7.4.3 - 7.4.25
Deprecated: Array and string offset access syntax with curly braces is deprecated in /in/u85JO on line 20 Deprecated: Array and string offset access syntax with curly braces is deprecated in /in/u85JO on line 20 Socket Error 0 - php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
Output for 7.0.20, 7.1.5 - 7.1.33, 7.2.6 - 7.2.25, 7.3.0 - 7.3.12, 7.3.32 - 7.3.33
Socket Error 0 - php_network_getaddresses: getaddrinfo failed: System error
Output for 7.2.29 - 7.2.33, 7.3.16 - 7.3.31
Socket Error 0 - php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
Output for 5.2.6 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.36, 5.6.0 - 5.6.28, 7.0.0 - 7.0.14, 7.1.0
Socket Error 0 - php_network_getaddresses: getaddrinfo failed: Name or service not known
Output for 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0, 5.2.2 - 5.2.5
Socket Error 0 -
Output for 5.2.1
Socket Error 1935633761 -
Output for 4.3.2 - 4.3.4, 4.3.10 - 4.3.11, 4.4.0 - 4.4.9
Socket Error 111 - Connection refused
Output for 4.3.5 - 4.3.9
Socket Error 0 - Success
Output for 4.3.0 - 4.3.1

Process exited with code 139.

preferences:
277.17 ms | 401 KiB | 375 Q