3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function getwhois($domain, $tld) { require_once("whois.class.php"); $whois = new Whois(); if( !$whois->ValidDomain($domain.'.'.$tld) ){ return 'Sorry, the domain is not valid or not supported.'; } if( $whois->Lookup($domain.'.'.$tld) ) { return $whois->GetData(1); }else{ return 'Sorry, an error occurred.'; } } $domain = trim($_REQUEST['domain']); $dot = strpos($domain, '.'); $sld = substr($domain, 0, $dot); $tld = substr($domain, $dot+1); $whois = getwhois($sld, $tld); echo " "; echo $whois; echo " "; getwhois("summoner","io"); ?>
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined index: domain in /in/O9u4M on line 20 Warning: require_once(whois.class.php): failed to open stream: No such file or directory in /in/O9u4M on line 4 Fatal error: require_once(): Failed opening required 'whois.class.php' (include_path='.:') in /in/O9u4M on line 4
Process exited with code 255.
Output for hhvm-3.12.0
Notice: Undefined index: domain in /in/O9u4M on line 20 Fatal error: File not found: whois.class.php in /in/O9u4M on line 4
Process exited with code 255.
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.1.0 - 5.2.17
Notice: Undefined index: domain in /in/O9u4M on line 20 Warning: require_once(whois.class.php): failed to open stream: No such file or directory in /in/O9u4M on line 4 Fatal error: require_once(): Failed opening required 'whois.class.php' (include_path='.:') in /in/O9u4M on line 4
Process exited with code 255.
Output for 4.3.2 - 5.0.5
Notice: Undefined index: domain in /in/O9u4M on line 20 Warning: getwhois(whois.class.php): failed to open stream: No such file or directory in /in/O9u4M on line 4 Fatal error: getwhois(): Failed opening required 'whois.class.php' (include_path='.:') in /in/O9u4M on line 4
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Notice: Undefined index: domain in /in/O9u4M on line 20 Warning: getwhois(whois.class.php) [http://www.php.net/function.getwhois]: failed to create stream: No such file or directory in /in/O9u4M on line 4 Fatal error: getwhois() [http://www.php.net/function.getwhois]: Failed opening required 'whois.class.php' (include_path='.:') in /in/O9u4M on line 4