3v4l.org

run code in 300+ PHP versions simultaneously
<?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 git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key "domain" in /in/O9u4M on line 20 Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /in/O9u4M on line 20 Warning: require_once(): open_basedir restriction in effect. File(whois.class.php) is not within the allowed path(s): (/tmp:/in:/etc) in /in/O9u4M on line 4 Warning: require_once(whois.class.php): Failed to open stream: Operation not permitted in /in/O9u4M on line 4 Fatal error: Uncaught Error: Failed opening required 'whois.class.php' (include_path='.:') in /in/O9u4M:4 Stack trace: #0 /in/O9u4M(26): getwhois('', '') #1 {main} thrown in /in/O9u4M on line 4
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
63.32 ms | 401 KiB | 8 Q