3v4l.org

run code in 300+ PHP versions simultaneously
<?php $spotify1="https://itunes.apple.com/search?term="; $spotify2=" - "; $spotify3="&limit=1"; $fp = fopen($STATS_FILE,'r'); if(!$fp) { die("Unable to connect to Icecast server."); } $stats_file_contents = ''; while(!feof($fp)) { $stats_file_contents .= fread($fp,1024); } fclose($fp); $radio_info = array(); $radio_info['genre'] = ''; $radio_info['listeners'] = ''; $radio_info['now_playing'] = ''; $temp = array(); $search_for = "<td\s[^>]*class=\"streamdata\">(.*)<\/td>"; $search_td = array('<td class="streamdata">','</td>'); if(preg_match_all("/$search_for/siU",$stats_file_contents,$matches)) { foreach($matches[0] as $match) { $to_push = str_replace($search_td,'',$match); $to_push = trim($to_push); array_push($temp,$to_push); } } $radio_info['listeners'] = $temp[4]; $radio_info['genre'] = $temp[6]; //$radio_info['now_playing'] = $temp[8]; //$radio_info['now_playing'] = $temp[8]; $radio_info['info']['now_playing'] = $temp[8]; $x = explode(" - ",$temp[8]); $artist1 = $x[0]; $song1 = $x[1]; $artist1 = str_replace('&amp;', 'and', $artist1); $song1 = str_replace('&amp;', 'and', $song1); $ttt =" - "; $title = $artist1.$ttt.$song1; $img640_url= "https://i.deep1.ru/playingnow/logo_default.png"; $img300_url= "https://i.deep1.ru/playingnow/logo_default.png"; $img64_url= "https://i.deep1.ru/playingnow/logo_default.png"; echo $spotify_url=$spotify1.$artist1.$spotify2.$song1.$spotify3 ; echo $spotify_url = str_replace(' ', '+', $spotify_url); //$spotify_url = "https://itunes.apple.com/search?term=Kylie+Minogue"; $ch = curl_init($spotify_url); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $spotify = curl_exec($ch); curl_close($ch); $obj = json_decode($spotify); //$total = $obj->resultCount->results; //$img640_url = $obj->resultCount[0]->results[1]->artworkUrl100; echo $img640_url;

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.0150.00016.61
8.3.50.0150.00016.38
8.3.40.0080.00818.70
8.3.30.0100.00718.83
8.3.20.0070.00020.30
8.3.10.0000.00821.91
8.3.00.0040.00417.91
8.2.180.0110.00417.00
8.2.170.0000.01922.96
8.2.160.0070.00720.56
8.2.150.0050.00324.18
8.2.140.0050.00524.66
8.2.130.0000.00721.05
8.2.120.0080.00026.35
8.2.110.0030.00720.53
8.2.100.0070.00417.78
8.2.90.0050.00319.05
8.2.80.0000.00818.04
8.2.70.0080.00417.63
8.2.60.0040.00417.80
8.2.50.0060.00318.10
8.2.40.0030.00522.20
8.2.30.0000.00819.12
8.2.20.0000.00718.01
8.2.10.0030.00517.96
8.2.00.0000.00718.02
8.1.280.0110.00725.92
8.1.270.0000.00823.91
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0080.00021.99
8.1.230.0080.00419.11
8.1.220.0070.00417.74
8.1.210.0050.00318.77
8.1.200.0000.01017.25
8.1.190.0060.00317.25
8.1.180.0000.00818.10
8.1.170.0000.00818.50
8.1.160.0070.00019.09
8.1.150.0040.00420.67
8.1.140.0070.00019.46
8.1.130.0000.00918.85
8.1.120.0050.00217.50
8.1.110.0040.00717.38
8.1.100.0000.00717.34
8.1.90.0040.00417.47
8.1.80.0070.00017.38
8.1.70.0040.00417.32
8.1.60.0000.00817.46
8.1.50.0030.00517.38
8.1.40.0000.00817.58
8.1.30.0000.00717.71
8.1.20.0000.00917.52
8.1.10.0080.00017.65
8.1.00.0000.00817.55
8.0.300.0000.00818.77
8.0.290.0080.00016.88
8.0.280.0030.00318.38
8.0.270.0040.00417.20
8.0.260.0000.00716.91
8.0.250.0000.00716.94
8.0.240.0050.00317.03
8.0.230.0070.00317.06
8.0.220.0070.00017.01
8.0.210.0070.00016.95
8.0.200.0030.00316.90
8.0.190.0000.00817.03
8.0.180.0060.00316.97
8.0.170.0030.00517.03
8.0.160.0000.00816.95
8.0.150.0000.00716.82
8.0.140.0070.00016.83
8.0.130.0030.00313.50
8.0.120.0000.00816.96
8.0.110.0040.00416.80
8.0.100.0070.00016.83
8.0.90.0000.00717.05
8.0.80.0120.00916.91
8.0.70.0020.00517.01
8.0.60.0030.00516.93
8.0.50.0000.00716.94
8.0.30.0100.00716.98
8.0.20.0110.00917.40
8.0.10.0040.00416.93
8.0.00.0160.00616.77
7.4.330.0020.00215.55
7.4.320.0000.00816.46
7.4.300.0030.00316.47
7.4.290.0000.00716.65
7.4.280.0060.00316.61
7.4.270.0030.00316.55
7.4.260.0050.00013.27
7.4.250.0040.00416.57
7.4.240.0000.00716.64
7.4.230.0050.00316.73
7.4.220.0090.01716.61
7.4.210.0090.00816.59
7.4.200.0040.00416.41
7.4.160.0100.01016.49
7.4.150.0190.00317.40
7.4.140.0070.01317.86
7.4.130.0100.01816.57
7.4.120.0120.01016.50
7.4.110.0030.01416.50
7.4.100.0120.01216.36
7.4.90.0100.00716.51
7.4.80.0040.01519.39
7.4.70.0100.00716.70
7.4.60.0140.00316.60
7.4.50.0090.00916.67
7.4.40.0060.01016.60
7.4.30.0140.00516.49
7.4.00.0040.01114.73
7.3.330.0000.00613.25
7.3.320.0000.00513.11
7.3.310.0030.00316.21
7.3.300.0040.00416.35
7.3.290.0030.00316.24
7.3.280.0090.00616.37
7.3.270.0070.01017.40
7.3.260.0140.00316.39
7.3.250.0100.00816.46
7.3.240.0050.01316.39
7.3.230.0140.00316.42
7.3.210.0140.00316.59
7.3.200.0110.00616.40
7.3.190.0080.00816.38
7.3.180.0100.00716.45
7.3.170.0100.00716.30
7.3.160.0070.01116.64
7.3.10.0160.01216.36
7.3.00.0080.00816.28
7.2.330.0160.00316.54
7.2.320.0110.01116.72
7.2.310.0060.01316.40
7.2.300.0070.01116.44
7.2.290.0120.00416.43
7.2.130.0090.00916.66
7.2.120.0120.00916.83
7.2.110.0120.01216.77
7.2.100.0180.00016.79
7.2.90.0210.00917.05
7.2.80.0100.01216.94
7.2.70.0140.00716.79
7.2.60.0120.00616.90
7.2.50.0040.01116.70
7.2.40.0040.01116.63
7.2.30.0060.00616.50
7.2.20.0120.00816.58
7.2.10.0060.01316.76
7.2.00.0090.00718.01
7.1.250.0190.00715.28
7.1.240.0120.01615.60
7.1.230.0100.00715.79
7.1.220.0160.00815.65
7.1.210.0130.01015.58
7.1.200.0080.00815.73
7.1.190.0160.00315.79
7.1.180.0130.00615.15
7.1.170.0000.01315.42
7.1.160.0130.00515.53
7.1.150.0080.00315.50
7.1.140.0140.00515.51
7.1.130.0130.01015.71
7.1.120.0000.01315.42
7.1.110.0030.01015.69
7.1.100.0060.01016.87
7.1.90.0120.00415.94
7.1.80.0100.01015.78
7.1.70.0050.01016.30
7.1.60.0150.00925.31
7.1.50.0070.01225.22
7.1.40.0080.01225.00
7.1.30.0110.01125.04
7.1.20.0130.01224.92
7.1.10.0090.00616.08
7.1.00.0050.01116.15
7.0.330.0080.00815.29
7.0.320.0110.00715.05
7.0.310.0130.00015.34
7.0.300.0090.00514.88
7.0.290.0040.01215.30
7.0.280.0030.00615.23
7.0.270.0150.00415.18
7.0.260.0080.00315.13
7.0.250.0080.00015.46
7.0.240.0070.00715.53
7.0.230.0030.00715.44
7.0.220.0040.00815.29
7.0.210.0000.01614.98
7.0.200.0110.00215.95
7.0.190.0060.00715.85
7.0.180.0030.00815.63
7.0.170.0030.01215.56
7.0.160.0030.01015.81
7.0.150.0040.00915.85
7.0.140.0030.01015.87
7.0.130.0050.01015.85
7.0.120.0070.00815.99
7.0.110.0080.00715.74
7.0.100.0070.00715.71
7.0.90.0050.00815.76
7.0.80.0040.00715.67
7.0.70.0050.00715.79
7.0.60.0060.00715.63
7.0.50.0050.00815.83
7.0.40.0110.00514.86
7.0.30.0050.00814.86
7.0.20.0040.01115.04
7.0.10.0070.00714.64
7.0.00.0080.00614.96
5.6.380.0170.00314.21

preferences:
55.59 ms | 401 KiB | 5 Q