3v4l.org

run code in 300+ PHP versions simultaneously
<?php require_once("assets/config.php"); require_once("assets/sys2.php"); ini_set('memory_limit', '-1'); if(!$keyword){ $head=' <link rel="canonical" href="http://sc-downloader.com/search" /> '; } else { $head=' <link rel="canonical" href="http://sc-downloader.com/search/'.$keyword2.'" /> '; } if($keyword){ $pagetitle=$keyword." | Sound Tracks | ".$sitename." Search"; $description="Download ".$keyword." tracks, ".$keyword." music files. See all results for ".$keyword.". Download ".$keyword." from SoundCloud now and enjoy your favorite music!"; $metakeywords=$keyword.", ".$keyword." music tracks, ".$keyword." search audio, ".$keyword." search engine, ".$metakeywords; } else { $pagetitle="Search Tracks | SoundCloud Search Engine | ".$sitename; $description="Search and download your favorite SoundCloud tracks. SoundCloud Search Engine can let you enjoy your favorite music. Search your song and download it from SoundCloud now. Fast and simple SoundCloud downloader"; $metakeywords="search mp3, soundcloud search, soundcloud search engine, search audio, mp3 search engine, audio files, search soundcloud, download soundcloud"; } if( empty( $obj ) ) { if($_SESSION['e']){ header("Location: /search?msg=No result found!"); exit(); } else { header("Location: /search/".$keyword."?action=viewmore"); $_SESSION['e']=1; exit(); } } require_once("assets/header.php"); ?> <h2 style="display:block;text-align:center;">SoundCloud Search Engine</h2> <form style="display:block;text-align:center;" id="searchform" action="/search.php" method="GET"> <input type="hidden" name="r" value="1" /> <input type="text" value="<?=$keyword?>" placeholder="Enter a song name or artist..." class="input" id="q" name="q" /> <input style="top: -1px;position: relative;left: -4px;padding-top: 6px;" type="submit" class="btn" value="Search" /> </form> <?php if($keyword){ ?> <script type="text/javascript" src="/assets/audio-player.js"></script> <?php foreach($obj as $arr){ if($i){ $i++; } else { $i=1; } $track_id=$arr['id']; $title=$arr['title']; $uri=$arr['uri'].".json"; $uri = modify_url(array('client_id' => '6813c5d125013568ef986b73e4ba265c'), $uri); $json = file_get_contents($uri); $obj = json_decode($json, true); $sclink=$obj['permalink_url']; $streamable=$obj['streamable']; $downloadable=$obj['downloadable']; $download=$obj['download_url']; $stream=$obj['stream_url']; $pic=$obj['artwork_url']; $user=$obj['user']; $user_id=$user['id']; $user=$user['username']; if($streamable==false){ if($downloadable==true){ $stream=$download; } } if($streamable==false && $downloadable==false){ break; } $queryu = parse_url($stream, PHP_URL_QUERY); // Returns a string if the URL has parameters or NULL if not if( $queryu ) { $stream .= '&client_id='.$client_id; } else { $stream .= '?client_id='.$client_id; } $headers2=get_headers($stream,1); $location2=$headers2['Location']; if(!$location2){ $location2="/download.php?url=".$track_url; } $duration=$arr['duration']; if(!$pic){ $pic='http://dummyimage.com/100x100/000000/ffffff&amp;text=No+PIC'; } ?> <h2 style="margin-bottom: 10px;">Download <?=$title?> (uploaded by <?=$user?>)</h2> <div id="dl" style="padding-bottom: 10px;border-bottom:1px solid #ccc;"> <img class="artwork" src="<?=$pic?>" alt="<?=$title?>" /> <div class="dl2"> <span class="h3">Title:</span> &nbsp; <?=$title?><br/> <span class="h3">Duration:</span> &nbsp; <?=duration($duration)?> <object style="position:relatvie;top:2px;display:block;" type="application/x-shockwave-flash" data="http://sc-downloader.com/assets/player.swf" id="audioplayer<?=$i?>" height="24" width="290"> <param name="movie" value="http://sc-downloader.com/assets/player.swf"> <param name="FlashVars" value="playerID=audioplayer<?=$i?>&amp;soundFile=<?=urlencode($location2)?>&amp;text=0xdddddd"> <param name="quality" value="high"> <param name="menu" value="false"> <param name="wmode" value="transparent"> </object> <br/> <a class="btn" href="/download.php?url=<?=$sclink?>">Download</a> </div> <a href="<?=$sclink?>" target="_blank" rel="nofollow" style="clear:both;float:right;text-decoration:underline;">View on SoundCloud</a> </div> <?php } if($i<10){ fetchmore($nexturl); } function fetchmore($url){ $url=$nexturl; $json = file_get_contents($nexturl); $obj = json_decode($json, true); foreach($obj as $arr){ global $i, $client_id, $track_url; if($i){ $i++; } else { $i=1; } $track_id=$arr['id']; $title=$arr['title']; $uri=$arr['uri'].".json"; $uri = modify_url(array('client_id' => '6813c5d125013568ef986b73e4ba265c'), $uri); $json = file_get_contents($uri); $obj = json_decode($json, true); $sclink=$obj['permalink_url']; $streamable=$obj['streamable']; $downloadable=$obj['downloadable']; $download=$obj['download_url']; $stream=$obj['stream_url']; $pic=$obj['artwork_url']; $user=$obj['user']; $user_id=$user['id']; $user=$user['username']; if($streamable==false){ if($downloadable==true){ $stream=$download; } } if($streamable==false && $downloadable==false){ break; } $queryu = parse_url($stream, PHP_URL_QUERY); // Returns a string if the URL has parameters or NULL if not if( $queryu ) { $stream .= '&client_id='.$client_id; } else { $stream .= '?client_id='.$client_id; } $headers2=get_headers($stream,1); $location2=$headers2['Location']; if(!$location2){ $location2="/download.php?url=".$track_url; } $duration=$arr['duration']; if(!$pic){ $pic='http://dummyimage.com/100x100/000000/ffffff&amp;text=No+PIC'; } echo ' <h2 style="margin-bottom: 10px;">Download <?=$title?> (uploaded by <?=$user?>)</h2> <div id="dl" style="padding-bottom: 10px;border-bottom:1px solid #ccc;"> <img class="artwork" src="'.$pic.'" alt="'.$title.'" /> <div class="dl2"> <span class="h3">Title:</span> &nbsp; '.$title.'<br/> <span class="h3">Duration:</span> &nbsp; '.duration($duration).' <object style="position:relatvie;top:2px;display:block;" type="application/x-shockwave-flash" data="http://sc-downloader.com/assets/player.swf" id="audioplayer'.$i.'" height="24" width="290"> <param name="movie" value="http://sc-downloader.com/assets/player.swf"> <param name="FlashVars" value="playerID=audioplayer'.$i.'&amp;soundFile='.urlencode($location2).'&amp;text=0xdddddd"> <param name="quality" value="high"> <param name="menu" value="false"> <param name="wmode" value="transparent"> </object> <br/> <a class="btn" href="/download.php?url='.$sclink.'">Download</a> </div> <a href="'.$sclink.'" target="_blank" rel="nofollow" style="clear:both;float:right;text-decoration:underline;">View on SoundCloud</a> </div> '; if($i==10 || $i>10){ break; } } } if($_GET['dev']){ echo $i; } $currurl=getUrl(); $s = modify_url(array('action' => 'viewmore'), $currurl); $bs = modify_url(array('action' => 'topresults'), $currurl); if($_SESSION['next-search']){ echo '<a style="padding:5px;margin-bottom:10px;border:1px solid #666;background:#ccc;display:block;text-align:center;" href="'.$s.'">View More</a>'; } if($_GET['action']=='viewmore'){ echo '<br/><a style="margin-bottom:12px;text-align:center;display:block;font-size:10px;text-decoration:underline;" href="'.$bs.'">(go to top results)</a>'; } } else { ?> <?php if($_GET['msg']){ ?> <p class="error"> <?=htmlentities($_GET['msg'])?> </p> <?php } ?> <div style="margin-top:50px;"> <h2>Recent Search keywords</h2> <p style="margin:20px;"> <?php $q1=mysql_query("SELECT * FROM `$tbl2` ORDER BY `id` DESC LIMIT 20") or die("error"); while($r=mysql_fetch_array($q1)){ echo "<a style='font-size:12px;' href='/search/".$r['keyword']."'>".str_replace("+"," ", $r['keyword'])."</a> &bull; "; } ?> </p> </div> <div style="margin-top:200px;">&nbsp;</div> <?php } require_once("assets/footer.php"); if($keyword){ $keyword=str_replace(" ", "+", $keyword); $keyword=mysql_real_escape_string($keyword); $q1=mysql_query("SELECT * FROM `$tbl2` WHERE `keyword`='$keyword' LIMIT 1"); if(mysql_num_rows($q1)=='0'){ mysql_query("INSERT INTO `$tbl2` (keyword) VALUES ('$keyword')"); } else { mysql_query("DELETE FROM `$tbl2` WHERE `keyword`='$keyword'"); mysql_query("INSERT INTO `$tbl2` (keyword) VALUES ('$keyword')"); } } ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0110.01118.56
8.3.50.0140.00821.92
8.3.40.0070.00719.09
8.3.30.0160.00320.47
8.3.20.0070.00720.46
8.3.10.0070.00722.09
8.3.00.0080.00022.31
8.2.180.0100.01017.13
8.2.170.0150.00022.96
8.2.160.0070.00720.64
8.2.150.0080.00824.18
8.2.140.0080.00024.66
8.2.130.0140.00426.16
8.2.120.0080.00019.41
8.2.110.0090.00022.26
8.2.100.0090.00318.03
8.2.90.0080.00019.17
8.2.80.0000.00819.46
8.2.70.0080.00017.50
8.2.60.0070.00318.05
8.2.50.0060.00318.07
8.2.40.0050.00318.47
8.2.30.0050.00318.27
8.2.20.0040.00417.94
8.2.10.0050.00317.91
8.2.00.0050.00317.79
8.1.280.0130.01025.92
8.1.270.0050.00224.66
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0000.01122.26
8.1.230.0090.00319.29
8.1.220.0030.00617.77
8.1.210.0000.00818.77
8.1.200.0030.00617.38
8.1.190.0040.00417.68
8.1.180.0080.00018.65
8.1.170.0060.00318.59
8.1.160.0040.00422.23
8.1.150.0040.00418.86
8.1.140.0070.00017.66
8.1.130.0000.00717.86
8.1.120.0040.00417.63
8.1.110.0030.00617.61
8.1.100.0040.00417.61
8.1.90.0050.00217.64
8.1.80.0000.00717.52
8.1.70.0040.00417.51
8.1.60.0000.00917.78
8.1.50.0000.00717.75
8.1.40.0050.00317.63
8.1.30.0080.00017.84
8.1.20.0040.00417.79
8.1.10.0030.00517.60
8.1.00.0000.00817.55
8.0.300.0070.00018.77
8.0.290.0000.00717.53
8.0.280.0070.00018.63
8.0.270.0050.00217.49
8.0.260.0040.00417.09
8.0.250.0070.00017.14
8.0.240.0040.00417.27
8.0.230.0040.00417.15
8.0.220.0000.00717.08
8.0.210.0050.00217.17
8.0.200.0080.00017.20
8.0.190.0040.00417.16
8.0.180.0000.00717.07
8.0.170.0050.00317.13
8.0.160.0000.00717.08
8.0.150.0070.00017.08
8.0.140.0050.00317.03
8.0.130.0060.00013.66
8.0.120.0030.00517.03
8.0.110.0070.00017.14
8.0.100.0050.00317.05
8.0.90.0030.00617.02
8.0.80.0120.00417.21
8.0.70.0000.00817.21
8.0.60.0040.00417.20
8.0.50.0000.00817.16
8.0.30.0180.00417.31
8.0.20.0130.00717.40
8.0.10.0000.00717.09
8.0.00.0110.00716.90
7.4.330.0000.00515.00
7.4.320.0000.00716.65
7.4.300.0050.00216.74
7.4.290.0000.00816.69
7.4.280.0000.00716.58
7.4.270.0030.00316.73
7.4.260.0000.00513.50
7.4.250.0040.00416.71
7.4.240.0040.00416.74
7.4.230.0040.00416.75
7.4.220.0110.00716.80
7.4.210.0100.00716.69
7.4.200.0050.00316.87
7.4.190.0030.00316.84
7.4.160.0110.00716.61
7.4.150.0110.00717.40
7.4.140.0080.00917.86
7.4.130.0090.00816.64
7.4.120.0050.01216.65
7.4.110.0060.01216.80
7.4.100.0000.01916.59
7.4.90.0150.00916.43
7.4.80.0090.00819.39
7.4.70.0130.00616.72
7.4.60.0000.01816.76
7.4.50.0060.00316.34
7.4.40.0080.00522.77
7.4.30.0030.01316.77
7.4.00.0080.00614.82
7.3.330.0050.00013.52
7.3.320.0030.00313.16
7.3.310.0030.00316.45
7.3.300.0040.00416.37
7.3.290.0110.00416.51
7.3.280.0100.00916.46
7.3.270.0150.00817.40
7.3.260.0070.01016.60
7.3.250.0070.01116.49
7.3.240.0140.00716.45
7.3.230.0070.01116.62
7.3.210.0060.01516.61
7.3.200.0060.01119.39
7.3.190.0030.01616.69
7.3.180.0100.01016.45
7.3.170.0110.01116.51
7.3.160.0160.00416.55
7.3.120.0030.01015.05
7.2.330.0080.01116.46
7.2.320.0130.01016.75
7.2.310.0130.00316.66
7.2.300.0100.00716.51
7.2.290.0080.00816.74
7.2.60.0160.00516.20
7.2.00.0060.00919.25
7.1.200.0000.01515.75
7.1.100.0040.00817.98
7.1.70.0000.01016.75
7.1.60.0060.02519.43
7.1.50.0200.00316.82
7.1.00.0070.05722.42
7.0.200.0040.00416.76
7.0.140.0070.07322.13
7.0.100.0070.04720.12
7.0.90.0100.08020.07
7.0.80.0070.08720.28
7.0.70.0230.04320.04
7.0.60.0030.04320.22
7.0.50.0230.07320.50
7.0.40.0130.04320.15
7.0.30.0070.06720.18
7.0.20.0070.04720.14
7.0.10.0230.06320.14
7.0.00.0070.08720.09
5.6.280.0030.07020.93
5.6.250.0100.07020.68
5.6.240.0070.05020.70
5.6.230.0030.06020.72
5.6.220.0130.07020.64
5.6.210.0100.06020.62
5.6.200.0070.06021.11
5.6.190.0070.05021.14
5.6.180.0070.08021.12
5.6.170.0100.06721.08
5.6.160.0100.08321.23
5.6.150.0130.04321.10
5.6.140.0030.04021.11
5.6.130.0030.09321.16
5.6.120.0000.05321.10
5.6.110.0070.08721.06
5.6.100.0070.06721.07
5.6.90.0030.08321.06
5.6.80.0130.07320.53
5.6.70.0130.07720.52
5.6.60.0030.08020.42
5.6.50.0130.06020.45
5.6.40.0000.05320.50
5.6.30.0000.04720.46
5.6.20.0070.06320.53
5.6.10.0030.08320.44
5.6.00.0130.07020.51
5.5.380.0130.06720.43
5.5.370.0130.07320.46
5.5.360.0130.06320.45
5.5.350.0130.04720.47
5.5.340.0030.04720.87
5.5.330.0070.05721.02
5.5.320.0100.05320.88
5.5.310.0230.04020.96
5.5.300.0070.06020.84
5.5.290.0030.08320.71
5.5.280.0070.04020.96
5.5.270.0030.05320.97
5.5.260.0000.04320.82
5.5.250.0030.05020.77
5.5.240.0100.07720.23
5.5.230.0070.06720.31
5.5.220.0030.03720.08
5.5.210.0170.06320.33
5.5.200.0170.06020.34
5.5.190.0030.04020.30
5.5.180.0070.04020.15
5.5.160.0130.08020.35
5.5.150.0030.07720.25
5.5.140.0170.04320.25
5.5.130.0130.08020.33
5.5.120.0070.06720.04
5.5.110.0100.06720.34
5.5.100.0100.08020.18
5.5.90.0030.05720.13
5.5.80.0100.06020.22
5.5.70.0030.07720.21
5.5.60.0030.06020.21
5.5.50.0170.07020.02
5.5.40.0130.07720.13
5.5.30.0030.07320.22
5.5.20.0070.05320.07
5.5.10.0100.06720.00
5.5.00.0030.07320.00
5.4.450.0130.07019.56
5.4.440.0100.07019.36
5.4.430.0200.05719.55
5.4.420.0070.03719.38
5.4.410.0000.04019.36
5.4.400.0070.03719.15
5.4.390.0100.07719.15
5.4.380.0070.07319.14
5.4.370.0030.05019.14
5.4.360.0100.06319.13
5.4.350.0100.06318.82
5.4.340.0200.06718.91
5.4.320.0100.06019.16
5.4.310.0130.07319.06
5.4.300.0070.07319.13
5.4.290.0000.05319.12
5.4.280.0170.06718.95
5.4.270.0030.05019.12
5.4.260.0070.07019.10
5.4.250.0100.03319.14
5.4.240.0070.07019.10
5.4.230.0100.07719.09
5.4.220.0130.07019.13
5.4.210.0030.04318.84
5.4.200.0070.06019.04
5.4.190.0070.07719.17
5.4.180.0070.06719.22
5.4.170.0030.04019.04
5.4.160.0070.03718.86
5.4.150.0100.04019.01
5.4.140.0130.02716.41
5.4.130.0070.03716.19
5.4.120.0070.03316.45
5.4.110.0030.03316.50
5.4.100.0030.03716.57
5.4.90.0070.03716.49
5.4.80.0030.03716.33
5.4.70.0070.03716.48
5.4.60.0070.03316.54
5.4.50.0000.04316.42
5.4.40.0030.03716.54
5.4.30.0000.06016.50
5.4.20.0070.03316.35
5.4.10.0100.07316.38
5.4.00.0030.04015.87
5.3.290.0070.05714.71
5.3.280.0130.06014.75
5.3.270.0170.07014.79
5.3.260.0030.05714.64
5.3.250.0000.04014.81
5.3.240.0070.03314.72
5.3.230.0070.03714.68
5.3.220.0030.03714.77
5.3.210.0030.04014.71
5.3.200.0000.04014.79
5.3.190.0030.04014.79
5.3.180.0000.04014.59
5.3.170.0030.03714.77
5.3.160.0070.03714.80
5.3.150.0000.03714.58
5.3.140.0030.03714.77
5.3.130.0030.03714.71
5.3.120.0070.03714.67
5.3.110.0070.03714.65
5.3.100.0070.07014.08
5.3.90.0070.06714.17
5.3.80.0100.04014.22
5.3.70.0100.07714.04
5.3.60.0070.04014.11
5.3.50.0070.03313.95
5.3.40.0030.03713.96
5.3.30.0030.03014.11
5.3.20.0030.03713.78
5.3.10.0070.03013.81
5.3.00.0030.03713.76

preferences:
47 ms | 401 KiB | 5 Q