3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $client_id = "6813c5d125013568ef986b73e4ba265c"; require_once 'functions.php'; //$client = new Services_Soundcloud('6813c5d125013568ef986b73e4ba265c', '2eb6f212de6f4963c3873f8afdf517e9'); // a permalink to a track $track_url = 'http://soundcloud.com/forss/voca-nomen-tuum'; if($_GET['url']){ $track_url = $_GET['url']; } $url="http://api.soundcloud.com/resolve.json?url=$track_url&client_id=$client_id"; $headers1=get_headers($url,1); $location1=$headers['Location']; $location1 = modify_url(array('client_id' => '6813c5d125013568ef986b73e4ba265c'), $location1); $location1=str_replace("//tracks","/tracks",$location1); $json = file_get_contents($location1); $obj = json_decode($json, true); $stream=$obj['stream_url']."?client_id=$client_id"; $track_id=$obj['id']; $headers2=get_headers($stream,1); $location2=$headers2['Location']; if(!$_GET['d']){ echo $track_id; echo $obj; } else { $m2=file_get_contents($location2); $rand=rand(1,100000); $filename="files/".$track_id."-".$rand.".mp3"; file_put_contents($filename,$m2); echo "<a href=$filename>download</a>"; } ?>

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).
Note: hhvm uses a JIT which only kicks in after a few runs. Since we run scripts only once, hhvm always runs slower.

VersionSystem time (s)User time (s)Memory (MiB)
7.1.70.0030.00516.95
7.1.60.0120.00919.40
7.1.50.0030.01416.98
7.1.00.0000.06322.36
7.0.200.0030.00516.60
7.0.140.0100.06722.11
7.0.60.0100.08020.05
7.0.50.0000.04317.85
7.0.40.0230.06320.11
7.0.30.0330.04720.21
7.0.20.0270.05720.18
7.0.10.0000.07720.01
7.0.00.0100.08320.16
5.6.280.0070.07020.87
5.6.210.0130.06020.71
5.6.200.0200.04018.23
5.6.190.0070.07320.42
5.6.180.0470.06020.64
5.6.170.0400.07720.53
5.6.160.0100.03320.53
5.6.150.0070.09018.09
5.6.140.0070.07318.11
5.6.130.0070.03718.19
5.6.120.0070.04021.09
5.6.110.0100.06021.14
5.6.100.0130.07720.89
5.6.90.0030.08321.02
5.6.80.0070.08020.41
5.5.350.0000.04320.41
5.5.340.0070.04717.99
5.5.330.0130.08320.57
5.5.320.0200.04320.38
5.5.310.0230.04020.31
5.5.300.0070.08017.99
5.5.290.0100.07717.96
5.5.280.0100.04020.79
5.5.270.0130.08020.85
5.5.260.0130.04320.73
5.5.250.0100.07320.79
5.5.240.0170.04020.27
5.4.450.0070.04719.49
5.4.440.0130.05319.25
5.4.430.0000.06719.45
5.4.420.0000.05019.48
5.4.410.0100.04719.34
5.4.400.0100.05719.14
5.4.390.0070.07319.16
5.4.380.0030.08719.09
5.4.370.0130.07019.01
5.4.360.0030.06319.03
5.4.350.0130.06319.09
5.4.340.0070.05319.20
5.4.320.0170.06719.18
5.4.310.0030.06719.09
5.4.300.0070.06019.18
5.4.290.0070.07719.15
5.4.280.0000.05319.18
5.4.270.0000.04019.08
5.4.260.0030.04718.96
5.4.250.0070.08019.14
5.4.240.0100.05319.16
5.4.230.0070.03719.14
5.4.220.0070.04019.08
5.4.210.0000.04318.92
5.4.200.0070.04318.92
5.4.190.0130.05719.15
5.4.180.0030.04018.92
5.4.170.0130.03719.07
5.4.160.0100.07018.90
5.4.150.0130.07019.10
5.4.140.0100.05016.29
5.4.130.0030.04016.35
5.4.120.0030.06716.48
5.4.110.0030.03716.16
5.4.100.0000.03716.62
5.4.90.0000.05716.41
5.4.80.0070.03716.28
5.4.70.0070.04716.30
5.4.60.0000.04016.35
5.4.50.0000.04016.32
5.4.40.0070.07316.25
5.4.30.0130.02716.35
5.4.20.0170.06016.34
5.4.10.0030.07016.23
5.4.00.0070.04315.82
5.3.290.0000.06014.61
5.3.280.0100.03314.54
5.3.270.0100.06014.59
5.3.260.0100.07014.45
5.3.250.0000.06014.55
5.3.240.0130.04314.59
5.3.230.0070.03714.58
5.3.220.0000.04314.68
5.3.210.0000.04014.67
5.3.200.0030.04014.55
5.3.190.0000.04014.48
5.3.180.0000.06314.54
5.3.170.0030.04014.60
5.3.160.0070.07714.48
5.3.150.0030.04014.48
5.3.140.0000.04314.52
5.3.130.0030.05714.51
5.3.120.0030.04014.50
5.3.110.0100.04314.45
5.3.100.0070.07313.98
5.3.90.0030.07313.85
5.3.80.0030.06713.82
5.3.70.0070.04014.02
5.3.60.0030.04013.94
5.3.50.0100.05713.80
5.3.40.0030.04013.75
5.3.30.0030.03713.85
5.3.20.0030.03713.53
5.3.10.0030.04013.66
5.3.00.0000.07013.45
5.2.170.0030.04711.09
5.2.160.0100.03011.01
5.2.150.0070.02711.14
5.2.140.0000.03310.98
5.2.130.0070.06010.96
5.2.120.0070.04011.05
5.2.110.0030.04711.11
5.2.100.0100.02311.13
5.2.90.0000.03011.11
5.2.80.0070.02711.27
5.2.70.0030.03310.96
5.2.60.0070.02710.99
5.2.50.0000.06711.00
5.2.40.0030.04311.16
5.2.30.0070.05711.14
5.2.20.0070.05310.89
5.2.10.0000.03710.89
5.2.00.0000.06710.79
5.1.60.0070.0379.92
5.1.50.0030.03310.02
5.1.40.0130.04010.06
5.1.30.0030.05310.34
5.1.20.0030.06010.36
5.1.10.0000.03010.09
5.1.00.0030.03010.06
5.0.50.0070.0478.48
5.0.40.0070.0408.42
5.0.30.0070.0638.21
5.0.20.0100.0338.36
5.0.10.0070.0408.12
5.0.00.0100.0578.15
4.4.90.0070.0237.66
4.4.80.0000.0377.66
4.4.70.0000.0277.66
4.4.60.0030.0377.66
4.4.50.0000.0237.66
4.4.40.0100.0307.66
4.4.30.0030.0277.66
4.4.20.0000.0207.66
4.4.10.0000.0277.66
4.4.00.0000.0577.66
4.3.110.0030.0377.66
4.3.100.0030.0307.66
4.3.90.0030.0377.66
4.3.80.0000.0577.66
4.3.70.0030.0377.66
4.3.60.0000.0177.66
4.3.50.0000.0277.66
4.3.40.0000.0277.66
4.3.30.0000.0177.66
4.3.20.0000.0207.66
4.3.10.0000.0177.66
4.3.00.0030.0137.66