3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (isDomainAvailible('http://www.panet.co.il')) { echo "Up and running!"; } else { echo "Woops, nothing found there."; } //returns true, if domain is availible, false if not function isDomainAvailible($domain) { //check, if a valid url is provided if(!filter_var($domain, FILTER_VALIDATE_URL)) { return false; } //initialize curl $curlInit = curl_init($domain); curl_setopt($curlInit,CURLOPT_CONNECTTIMEOUT,10); curl_setopt($curlInit,CURLOPT_HEADER,true); curl_setopt($curlInit,CURLOPT_NOBODY,true); curl_setopt($curlInit,CURLOPT_RETURNTRANSFER,true); //get answer $response = curl_exec($curlInit); curl_close($curlInit); if ($response) return true; return false; }
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/Wr63E:22 Stack trace: #0 /in/Wr63E(3): isDomainAvailible('http://www.pane...') #1 {main} thrown in /in/Wr63E on line 22
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:
37.17 ms | 401 KiB | 8 Q