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 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.28, 8.4.1 - 8.4.14, 8.5.0 - 8.5.1
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.
Output for 8.4.15
/bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libm.so.6: version `GLIBC_2.35' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.34' not found (required by /bin/php-8.4.15) /bin/php-8.4.15: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /bin/php-8.4.15)
Process exited with code 1.
Output for 4.3.2 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.40

Process exited with code 255.
Output for 4.3.0 - 4.3.1

preferences:
40.37 ms | 408 KiB | 5 Q