3v4l.org

run code in 300+ PHP versions simultaneously
<?php function QueryWhoisServer($whoisserver, $domain) { $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"; } } } return $res; } print QueryWhoisServer("whois.verisign-grs.co", "com");
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Fatal error: Array and string offset access syntax with curly braces is no longer supported in /in/csSlj on line 18
Process exited with code 255.
Output for 7.4.0 - 7.4.1, 7.4.26 - 7.4.33
Deprecated: Array and string offset access syntax with curly braces is deprecated in /in/csSlj on line 18 Deprecated: Array and string offset access syntax with curly braces is deprecated in /in/csSlj on line 18 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/csSlj on line 18 Deprecated: Array and string offset access syntax with curly braces is deprecated in /in/csSlj on line 18 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.38, 5.6.0 - 5.6.40, 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.26, 7.3.0 - 7.3.13, 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.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 32764 -
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 11 - Resource temporarily unavailable
Output for 4.3.0 - 4.3.1

Process exited with code 139.

preferences:
304.07 ms | 401 KiB | 456 Q