3v4l.org

run code in 300+ PHP versions simultaneously
<?php $url="http://www.mobiflip.de/xperia-play-china-geraete-konzept/"; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_TIMEOUT, 3); curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_HEADER, false); // FeedBurner requires a proper USER-AGENT... curl_setopt($curl, CURL_HTTP_VERSION_1_1, true); curl_setopt($curl, CURLOPT_ENCODING, "gzip, deflate"); curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3"); $content = curl_exec($curl); $content = substr($content,strpos($content,"<body>")); // $content = substr($content,strpos($content,$n->title)); //echo $content; preg_match_all('@src=[\'"](?:http(?:s)*:)*(?://)*(?P<src>[a-zA-Z0-9/_\-\.]+(jpg|png|gif|jpeg|tif))[\'"\?%]@i', $content, $image); //$c = new DOMDocument(); //@$c->loadXML($content); //var_dump($c->getElementsByTagName('img'));//->item(0)->getAttribute('src'); //$xml=simplexml_load_string($content); //print_r($xml); //return; $actPic = new stdClass(); $actPic->size=0; $actPic->url=null; foreach($image['src'] as $pic){ try{ $pic="http://".$pic; $sz=getimagesize($pic); echo "<br>".$pic.":";var_dump($sz);echo "<br>"; if( $sz && $sz[0]>400 && $sz[0]*$sz[1] > $actPic->size ){ $actPic->size=$sz[0]*$sz[1]; $actPic->url=$pic; } }catch(Exception $e){ Debugbar::addError($e); } } echo "<img src='".$actPic->url."'><br>"; ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/KJafT:6 Stack trace: #0 {main} thrown in /in/KJafT on line 6
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:
40.46 ms | 401 KiB | 8 Q