3v4l.org

run code in 300+ PHP versions simultaneously
<?php function curl_cek($url) { $ch = @curl_init(); curl_setopt($ch, CURLOPT_URL, $url); $head[] = "Connection: keep-alive"; $head[] = "Keep-Alive: 300"; $head[] = "Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7"; $head[] = "Accept-Language: en-us,en;q=0.5"; curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); curl_setopt($ch, CURLOPT_HTTPHEADER, $head); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_TIMEOUT, 60); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60); @curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); $rmx = curl_exec($ch); curl_close($ch); return $rmx; } function file_download($link,$dosya_adi=NULL){ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$link); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_BINARYTRANSFER,1); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_FOLLOWLOCATION , TRUE); $dosya=curl_exec($ch); curl_close($ch); if($dosya_adi==NULL){ $dosya_adi=explode("/",$link); $dosya_adi=array_reverse($dosya_adi); $dosya_adi=$dosya_adi[0]; } $fp = fopen($dosya_adi,'w'); fwrite($fp, $dosya); fclose($fp); } $video=curl_cek("https://www.facebook.com/photo.php?v=638009432883291"); $videosu = "#sd_src(.*?)thumbnail_src#si"; $parcala=preg_match_all($videosu,$video,$linkcek); foreach($linkcek[1] as $cekim){ $cekim=str_replace ("\u002522\u00253A\u002522https","http",$cekim); $cekim=str_replace ("\u002522\u00252C\u002522","",$cekim); $cekim=str_replace ("\u00253A\u00255C\u00252F\u00255C\u00252F","://",$cekim); $cekim=str_replace ("\u00255C\u00252F","/",$cekim); $cekim=str_replace ("\u00253F","?",$cekim); $cekim=str_replace ("\u00253D","=",$cekim); $cekim=str_replace ("\u002526","&amp;",$cekim); } //https://fbcdn-video-a.akamaihd.net/hvideo-ak-prn2/v/1210329_206230309559696_1056433056_n.mp4?oh=cfa0adf9a2d405182d2fde8c6ba096b3&amp;oe=5253103B&amp;__gda__=1381174812_0072c1253467444b2ab87c9663993d4f file_download($cekim,'dosya.mp4'); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught Error: Call to undefined function curl_init() in /in/aODQq:3 Stack trace: #0 /in/aODQq(42): curl_cek('https://www.fac...') #1 {main} thrown in /in/aODQq on line 3
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:
162.68 ms | 405 KiB | 5 Q