3v4l.org

run code in 300+ PHP versions simultaneously
<?php require_once 'config.php'; require_once 'functions.php'; if($_GET['url']){ $track_url = $_GET['url']; $track_url = trim($track_url); } if(!$track_url){ header("Location: /?utm_source=noinput"); exit(); } if((!filter_var($track_url, FILTER_VALIDATE_URL)) && (!empty($track_url))){ $error="Invalid URL"; } if(!$error){ $url="http://api.soundcloud.com/resolve.json?url=".$track_url."&client_id=".$client_id; $response_code=check_url($url); if($response_code==404){ $error="Playlist not found"; } if($response_code==400){ $error="Bad URL (#400)"; } } if(!$error){ $headers1=get_headers($url,1); $location1=$headers1['Location']; if(!$location1){ $headers1=get_headers($url,1); $location1=$headers1['Location']; } } if($location1){ $json = file_get_contents_curl($location1) or error_log("download error for $url"); if(!$json){ $json = file_get_contents_curl($location1) or error_log("download error again for $url"); } if(!$json){ header("Location: /?error=1&utm_source=downloaderror"); exit(); } } else { $error="Unable to get playlist data"; } if(!$error){ $obj = json_decode($json, true); $kind=$obj['kind']; if($kind!='playlist'){ $error="Not a playlist!"; } } if(!$error){ $id=$obj['id']; $title=$obj['title']; $sclink=$obj['permalink_url']; $buy=$obj['purchase_url']; $user=$obj['user']; $user_id=$user['id']; $user=$user['username']; $duration=$obj['duration']; $description=$obj['description']; $tracks=$obj['tracks']; $pic=$obj['artwork_url']; $pic300=$pic; $pagetitle="$title - $user | $sitename"; $description="Download $title for free. Listen to $title or download $title. $title Mp3, audio music. Download music using SC-DOWNLOADER.COM fast, simple and free."; $metakeywords="$title, $user, $title by $user, $title Mp3, $title music, download $title, audio music, sc-downloader.com"; $description=str_replace('"', '\'', $description); $metakeywords=str_replace('"', '\'', $metakeywords); } else { $pagetitle="Error! | $sitename"; } $head_include_html=<<<EOF <meta itemprop="name" content="$title" /> <meta itemprop="description" content="$description" /> <meta itemprop="image" content="$pic300" /> <meta name="twitter:card" content="summary" /> <meta name="twitter:title" content="$title" /> <meta name="twitter:description" content="$description" /> <meta name="twitter:image:src" content="$pic300" /> <meta name="twitter:domain" content="sc-downloader.com" /> <meta property="og:title" content="$title" /> <meta property="og:type" content="music.song" /> <meta property="og:description" content="$description" /> <meta property="og:image" content="$pic300" /> <meta property="og:url" content="http://sc-downloader.com/playlist/$title-$id.html" /> <meta property="og:site_name" content="$sitename" /> <meta property="og:see_also" content="http://sc-downloader.com" /> <meta property="fb:admins" content="100001767032587" /> <link rel="canonical" href="http://sc-downloader.com/playlist/$title-$id.html" /> EOF; require_once("assets/header.php"); ?> <?php if($error){ echo "<h2>Error!</h2>"; echo "<p class='error'><b>Error!</b> ".$error."</p>"; } else { echo "<h2>$title <small> ($user) </small></h2>"; echo "<p>$description</p>"; if(!is_array($tracks)) { echo "<p class='error'>Unable to fetch playlist. Please try again!</p>"; } else { echo "<h2>Tracks</h2>"; foreach($tracks as $track){ $link=urlencode($track['permalink_url']); $html=<<<EOF <a href="/download.php?url=$link&amp;utm_source=playlist_downloader">Download $title</a> <br/> EOF; } } } ?> <?php require_once("assets/footer.php"); ?>

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.0000.01418.43
8.3.50.0090.00921.98
8.3.40.0110.01118.96
8.3.30.0100.00319.13
8.3.20.0040.00420.40
8.3.10.0050.00323.65
8.3.00.0090.00019.26
8.2.180.0110.00716.88
8.2.170.0070.00722.96
8.2.160.0100.01020.56
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0000.00826.16
8.2.120.0100.00322.14
8.2.110.0110.00020.50
8.2.100.0090.00318.37
8.2.90.0040.00419.24
8.2.80.0030.00617.97
8.2.70.0080.00017.75
8.2.60.0050.00518.05
8.2.50.0030.00518.07
8.2.40.0050.00319.83
8.2.30.0040.00418.17
8.2.20.0000.00817.81
8.2.10.0040.00418.08
8.2.00.0050.00317.79
8.1.280.0070.01025.92
8.1.270.0030.00622.27
8.1.260.0000.00826.35
8.1.250.0050.00328.09
8.1.240.0080.00023.91
8.1.230.0060.00619.18
8.1.220.0050.00317.77
8.1.210.0050.00318.77
8.1.200.0100.00017.48
8.1.190.0080.00017.11
8.1.180.0000.00818.10
8.1.170.0000.00918.76
8.1.160.0070.00022.16
8.1.150.0040.00418.99
8.1.140.0000.00817.40
8.1.130.0030.00317.84
8.1.120.0020.00517.39
8.1.110.0060.00317.50
8.1.100.0040.00417.52
8.1.90.0080.00017.51
8.1.80.0000.00817.53
8.1.70.0000.00817.46
8.1.60.0080.00017.60
8.1.50.0040.00417.54
8.1.40.0060.00317.52
8.1.30.0060.00317.76
8.1.20.0000.00817.75
8.1.10.0030.00617.54
8.1.00.0000.00817.56
8.0.300.0030.00618.77
8.0.290.0040.00417.00
8.0.280.0040.00418.52
8.0.270.0030.00517.41
8.0.260.0000.00717.32
8.0.250.0040.00417.09
8.0.240.0000.00717.06
8.0.230.0000.00717.16
8.0.220.0000.00717.14
8.0.210.0030.00317.12
8.0.200.0030.00317.10
8.0.190.0000.00717.24
8.0.180.0050.00517.17
8.0.170.0020.00517.05
8.0.160.0070.00017.14
8.0.150.0000.00716.96
8.0.140.0040.00417.05
8.0.130.0030.00613.58
8.0.120.0040.00417.08
8.0.110.0030.00617.07
8.0.100.0030.00517.09
8.0.90.0070.00017.07
8.0.80.0060.01217.07
8.0.70.0050.00317.19
8.0.60.0080.00017.07
8.0.50.0040.00417.07
8.0.30.0170.00517.19
8.0.20.0170.01017.40
8.0.10.0030.00617.15
8.0.00.0100.00717.04
7.4.330.0000.00515.02
7.4.320.0000.00616.52
7.4.300.0000.00616.54
7.4.290.0000.00716.60
7.4.280.0040.00816.61
7.4.270.0040.00416.70
7.4.260.0000.00716.64
7.4.250.0020.00516.55
7.4.240.0030.00416.69
7.4.230.0030.00316.57
7.4.220.0070.01816.61
7.4.210.0100.00716.56
7.4.200.0040.00416.80
7.4.160.0060.01016.69
7.4.150.0120.00617.40
7.4.140.0100.01017.86
7.4.130.0130.00516.75
7.4.120.0120.00516.53
7.4.110.0060.01216.74
7.4.100.0120.00616.57
7.4.90.0150.00416.59
7.4.80.0070.01119.39
7.4.70.0070.01116.61
7.4.60.0060.01016.66
7.4.50.0030.00316.60
7.4.40.0130.00316.55
7.4.30.0130.00616.63
7.3.330.0050.00013.38
7.3.320.0030.00513.12
7.3.310.0040.00416.46
7.3.300.0000.00716.24
7.3.290.0120.00516.40
7.3.280.0070.01016.38
7.3.270.0140.01117.40
7.3.260.0030.01516.59
7.3.250.0100.00816.54
7.3.240.0110.00716.61
7.3.230.0150.00316.39
7.3.210.0070.01016.47
7.3.200.0050.01519.39
7.3.190.0070.01016.59
7.3.180.0030.01316.59
7.3.170.0070.01016.52
7.3.160.0100.00716.64
7.2.330.0100.00716.34
7.2.320.0140.00716.61
7.2.310.0140.00416.50
7.2.300.0080.00816.50
7.2.290.0180.00016.29
5.4.340.0060.04012.01
5.4.320.0050.04212.50
5.4.310.0060.03712.49
5.4.300.0070.03612.49
5.4.290.0050.04012.49
5.4.280.0050.03712.39
5.4.270.0080.03412.38
5.4.260.0080.05212.39
5.4.250.0090.03812.38
5.4.240.0080.03712.38
5.4.230.0050.04012.38
5.4.220.0060.03712.38
5.4.210.0100.03212.38
5.4.200.0090.03812.38
5.4.190.0100.03812.37
5.4.180.0030.03912.38
5.4.170.0050.03712.39
5.4.160.0090.03412.38
5.4.150.0080.03812.38
5.4.140.0070.03712.07
5.4.130.0070.03512.05
5.4.120.0030.04012.02
5.4.110.0090.03612.00
5.4.100.0040.03812.01
5.4.90.0070.04012.00
5.4.80.0070.04012.01
5.4.70.0090.03812.00
5.4.60.0050.05012.00
5.4.50.0050.04112.00
5.4.40.0100.03612.00
5.4.30.0050.03911.99
5.4.20.0070.03611.98
5.4.10.0090.03311.99
5.4.00.0090.05311.48
5.3.290.0070.04812.80
5.3.280.0080.03812.71
5.3.270.0070.04012.73
5.3.260.0070.04312.72
5.3.250.0060.03812.72
5.3.240.0080.04512.72
5.3.230.0110.03812.71
5.3.220.0090.03812.68
5.3.210.0070.04012.68
5.3.200.0060.03912.68
5.3.190.0150.03812.68
5.3.180.0100.03712.67
5.3.170.0080.03912.67
5.3.160.0050.04512.67
5.3.150.0130.05712.67
5.3.140.0070.04012.66
5.3.130.0100.04612.66
5.3.120.0070.04212.66
5.3.110.0080.03912.66
5.3.100.0060.04212.12
5.3.90.0080.03912.09
5.3.80.0060.04012.09
5.3.70.0080.03612.09
5.3.60.0070.03712.08
5.3.50.0060.04012.02
5.3.40.0070.03612.02
5.3.30.0030.04111.98
5.3.20.0040.03811.76
5.3.10.0070.03811.72
5.3.00.0110.03611.71
5.2.170.0050.0309.22
5.2.160.0060.0309.22
5.2.150.0030.0349.22
5.2.140.0030.0329.21
5.2.130.0060.0299.18
5.2.120.0060.0319.18
5.2.110.0060.0329.19
5.2.100.0080.0299.18
5.2.90.0070.0289.18
5.2.80.0070.0299.18
5.2.70.0080.0419.18
5.2.60.0040.0399.13
5.2.50.0090.0269.09
5.2.40.0070.0349.07
5.2.30.0070.0359.05
5.2.20.0060.0329.10
5.2.10.0090.0289.03
5.2.00.0050.0328.89
5.1.60.0060.0238.17
5.1.50.0050.0258.17
5.1.40.0030.0268.16
5.1.30.0040.0268.51
5.1.20.0060.0268.53
5.1.10.0060.0248.25
5.1.00.0050.0268.25
5.0.50.0040.0286.75
5.0.40.0040.0196.61
5.0.30.0020.0376.42
5.0.20.0030.0246.39
5.0.10.0050.0216.37
5.0.00.0030.0326.36
4.4.90.0050.0184.78
4.4.80.0060.0204.75
4.4.70.0030.0164.75
4.4.60.0050.0204.76
4.4.50.0030.0154.77
4.4.40.0020.0274.72
4.4.30.0010.0194.76
4.4.20.0040.0164.85
4.4.10.0050.0144.85
4.4.00.0030.0254.75
4.3.110.0030.0204.67
4.3.100.0030.0194.66
4.3.90.0050.0164.63
4.3.80.0050.0224.63
4.3.70.0050.0144.63
4.3.60.0050.0214.63
4.3.50.0050.0164.63
4.3.40.0020.0254.58
4.3.30.0040.0163.39
4.3.20.0030.0163.37
4.3.10.0030.0213.29
4.3.00.0200.0237.15

preferences:
38.18 ms | 401 KiB | 5 Q