3v4l.org

run code in 300+ PHP versions simultaneously
<!DOCTYPE html> <html> <head> <title>TOP SECRET</title> <style> pre { font-size: 10pt; font-family: "Fira Code"; font-weight: bold; } </style> </head> <body> <?php $counter = 0; # https://gist.github.com/NuckChorris/fd73d6744e56545c8def # $url = "https://gist.github.com/NuckChorris/fd73d6744e56545c8def/raw/674266cc5edf294e70b39e75298dbb52911b7332/2014_season_stats.json"; $url = "https://gist.github.com/NuckChorris/fd73d6744e56545c8def/raw/7bad79aead47eddeba5667a422c7f5c00f31fc3a/2014_type_stats.json"; # Turns URL into JSON $json = file_get_contents($url); # Turns JSON into PHP array() $data = json_decode($json, true); # Target data needed $data = $data['TV']; # Create an empty array() for the foreach loop $sort = array(); # Loop through the array foreach ($data as $key => $row) { # Use for Most Popular $sort[$key] = $row['count']; # Use for Highest Rated #if($row['count'] > 0){ # $sort[$key] = $row['rating']; #} else { # $sort[$key] = 0; #} } # Sort the array by 'count' or 'rating' as defined above array_multisort($sort, SORT_DESC , $data); # Print array into webpage from highest to lowest count foreach ($data as $key => $row) { $counter++; print "<pre>" . $counter . ")<br>" . # Use $key for Genres and Seasons, # Use $row['slug'] for Type. #$key . $row['slug'] . "<br>View: " . $row['count'] . "<br>Rati: " . round($row['rating'], 2) . "<br>" . "<br>Comp: " . $row['distribution']['Completed'] . "<br>Curr: " . $row['distribution']['Currently Watching'] . "<br>Drop: " . $row['distribution']['Dropped'] . "<br>On H: " . $row['distribution']['On Hold'] . "<br>Plan: " . $row['distribution']['Plan to Watch'] . "<br><br></pre>"; } ?> </body> </html>

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.00716.75
8.3.50.0080.01021.18
8.3.40.0150.00018.92
8.3.30.0110.00419.11
8.3.20.0000.00820.16
8.3.10.0040.00421.89
8.3.00.0000.00819.55
8.2.180.0060.00918.79
8.2.170.0120.00322.96
8.2.160.0110.00320.27
8.2.150.0090.00024.18
8.2.140.0060.00324.66
8.2.130.0000.00826.16
8.2.120.0040.00419.07
8.2.110.0030.00620.29
8.2.100.0080.00418.03
8.2.90.0040.00419.36
8.2.80.0060.00317.97
8.2.70.0060.00317.63
8.2.60.0050.00517.93
8.2.50.0060.00318.07
8.2.40.0030.00518.34
8.2.30.0000.00818.07
8.2.20.0090.00017.72
8.2.10.0080.00018.13
8.2.00.0090.00018.10
8.1.280.0100.01325.92
8.1.270.0090.00020.43
8.1.260.0140.00026.35
8.1.250.0000.00828.09
8.1.240.0030.00623.65
8.1.230.0110.00019.16
8.1.220.0050.00317.74
8.1.210.0080.00018.77
8.1.200.0060.00617.23
8.1.190.0080.00017.23
8.1.180.0030.00518.10
8.1.170.0040.00418.73
8.1.160.0040.00422.04
8.1.150.0050.00318.93
8.1.140.0030.00617.54
8.1.130.0030.00317.91
8.1.120.0080.00017.40
8.1.110.0040.00417.51
8.1.100.0000.00817.41
8.1.90.0080.00017.53
8.1.80.0070.00017.48
8.1.70.0000.00717.38
8.1.60.0060.00317.58
8.1.50.0040.00417.44
8.1.40.0050.00517.45
8.1.30.0000.00817.67
8.1.20.0000.00817.69
8.1.10.0040.00417.57
8.1.00.0040.00417.44
8.0.300.0020.00518.77
8.0.290.0000.00817.00
8.0.280.0000.00718.47
8.0.270.0040.00417.30
8.0.260.0070.00017.24
8.0.250.0030.00317.15
8.0.240.0070.00017.20
8.0.230.0000.00717.19
8.0.220.0040.00416.96
8.0.210.0000.00716.95
8.0.200.0000.00617.00
8.0.190.0060.00317.04
8.0.180.0080.00416.91
8.0.170.0030.00517.04
8.0.160.0070.00017.07
8.0.150.0000.00817.02
8.0.140.0040.00716.97
8.0.130.0070.00013.45
8.0.120.0050.00316.87
8.0.110.0050.00317.05
8.0.100.0080.00017.10
8.0.90.0000.00816.93
8.0.80.0060.01317.06
8.0.70.0020.00517.01
8.0.60.0000.00817.07
8.0.50.0070.00016.89
8.0.30.0100.00717.12
8.0.20.0050.01317.40
8.0.10.0030.00616.98
8.0.00.0090.00916.77
7.4.330.0050.00015.03
7.4.320.0030.00316.61
7.4.300.0000.00616.45
7.4.290.0000.00716.50
7.4.280.0000.00816.54
7.4.270.0000.00816.70
7.4.260.0000.00716.63
7.4.250.0030.00516.60
7.4.240.0040.00316.60
7.4.230.0050.00216.55
7.4.220.0090.01216.73
7.4.210.0080.01316.61
7.4.200.0040.00416.58
7.4.160.0130.00316.72
7.4.150.0130.00617.40
7.4.140.0140.00817.86
7.4.130.0080.01416.62
7.4.120.0110.00916.66
7.4.110.0000.01816.47
7.4.100.0090.00916.45
7.4.90.0100.01016.82
7.4.80.0070.01119.39
7.4.70.0120.01216.61
7.4.60.0090.00916.68
7.4.50.0000.00616.48
7.4.40.0100.00616.63
7.4.30.0080.00916.66
7.4.00.0030.00915.15
7.3.330.0030.00313.18
7.3.320.0000.00513.20
7.3.310.0070.00016.43
7.3.300.0050.00216.43
7.3.290.0080.00716.46
7.3.280.0100.00816.45
7.3.270.0120.00617.40
7.3.260.0070.01016.48
7.3.250.0100.00816.55
7.3.240.0070.01016.48
7.3.230.0130.00316.40
7.3.210.0070.01116.41
7.3.200.0110.00719.39
7.3.190.0140.00716.34
7.3.180.0080.00816.59
7.3.170.0070.01016.50
7.3.160.0120.00916.53
7.2.330.0070.01316.40
7.2.320.0090.01016.41
7.2.310.0120.00616.52
7.2.300.0060.01216.70
7.2.290.0120.00916.44
7.2.60.0070.00716.60
7.2.00.0040.01119.39
7.1.200.0070.00716.00
7.1.100.0060.00818.47
7.1.70.0080.00017.57
7.1.60.0000.01519.86
7.1.50.0070.01717.46
7.1.00.0070.07322.95
7.0.200.0640.00014.86
7.0.60.0100.08320.47
7.0.50.0130.08018.28
7.0.40.0070.09320.56
7.0.30.0230.04320.46
7.0.20.0270.04720.48
7.0.10.0030.09020.53
7.0.00.0070.04020.50
5.6.280.0030.07321.54
5.6.210.0070.08721.09
5.6.200.0070.05018.61
5.6.190.0000.05021.01
5.6.180.0500.07020.98
5.6.170.0430.05720.86
5.6.160.0200.04720.73
5.6.150.0170.07718.39
5.6.140.0070.07018.51
5.6.130.0070.08318.47
5.6.120.0170.07721.50
5.6.110.0030.08721.46
5.6.100.0070.05321.41
5.6.90.0070.04721.32
5.6.80.0030.04020.65
5.5.350.0300.05720.87
5.5.340.0030.08318.37
5.5.330.0030.09320.90
5.5.320.0170.04020.66
5.5.310.0270.05320.66
5.5.300.0070.03718.26
5.5.290.0130.07018.32
5.5.280.0030.08021.27
5.5.270.0130.08021.08
5.5.260.0170.06021.30
5.5.250.0030.04021.07
5.5.240.0070.07720.59
5.4.450.0230.05319.84
5.4.440.0770.06719.79
5.4.430.0200.04319.56
5.4.420.0170.05719.81
5.4.410.0070.05719.71
5.4.400.0200.05719.17
5.4.390.0130.05019.29
5.4.380.0030.06319.40
5.4.370.0170.04319.27
5.4.360.0130.04719.29
5.4.350.0130.05319.24
5.4.340.0100.05319.39
5.4.320.0170.04719.33
5.4.310.0270.03719.38
5.4.300.0070.06719.39
5.4.290.0100.05719.34
5.4.280.0100.05319.36
5.4.270.0030.06319.39
5.4.260.0030.05719.39
5.4.250.0100.05319.23
5.4.240.0000.06719.27
5.4.230.0070.05319.35
5.4.220.0170.04719.27
5.4.210.0170.05019.27
5.4.200.0070.05316.91
5.4.190.0130.06019.34
5.4.180.0200.04319.27
5.4.170.0100.05319.31
5.4.160.0130.04719.34
5.4.150.0070.05719.36
5.4.140.0130.05716.53
5.4.130.0030.05316.52
5.4.120.0000.05716.23
5.4.110.0130.04716.18
5.4.100.0030.06016.22
5.4.90.0170.05016.41
5.4.80.0130.04316.16
5.4.70.0100.05016.35
5.4.60.0130.04316.38
5.4.50.0130.04716.39
5.4.40.0100.05316.31
5.4.30.0100.04716.59
5.4.20.0100.04716.46
5.4.10.0170.04316.34
5.4.00.0070.05015.96
5.3.290.0100.05714.59
5.3.280.0200.04014.49
5.3.270.0170.04314.45
5.3.260.0130.05014.61
5.3.250.0100.05314.51
5.3.240.0100.05014.57
5.3.230.0100.05014.52
5.3.220.0030.05314.43
5.3.210.0100.05314.41
5.3.200.0100.05014.45
5.3.190.0130.04714.37
5.3.180.0070.05014.49
5.3.170.0030.05314.58
5.3.160.0000.06014.37
5.3.150.0100.05014.42
5.3.140.0070.05314.56
5.3.130.0170.04314.52
5.3.120.0030.06014.47
5.3.110.0030.05714.36
5.3.100.0100.05013.85
5.3.90.0030.05714.03
5.3.80.0130.04713.87
5.3.70.0070.05013.91
5.3.60.0100.05313.85
5.3.50.0100.05013.80
5.3.40.0030.05713.82
5.3.30.0030.05713.77
5.3.20.0100.04713.61
5.3.10.0070.04713.51
5.3.00.0100.04713.64
5.2.170.0030.04711.08
5.2.160.0070.04011.03
5.2.150.0070.04011.07
5.2.140.0100.03710.95
5.2.130.0130.04010.95
5.2.120.0030.04011.05
5.2.110.0030.04310.98
5.2.100.0030.04310.96
5.2.90.0130.03310.98
5.2.80.0030.04310.95
5.2.70.0070.04310.98
5.2.60.0030.04310.86
5.2.50.0100.03311.00
5.2.40.0070.04010.92
5.2.30.0130.03710.73
5.2.20.0070.04010.61
5.2.10.0100.03710.61
5.2.00.0100.04010.59
5.1.60.0030.03710.08
5.1.50.0100.0309.99
5.1.40.0070.03710.05
5.1.30.0070.05010.42
5.1.20.0130.03310.35
5.1.10.0130.0409.93
5.1.00.0100.04710.03
5.0.50.0070.0378.59
5.0.40.0100.0338.35
5.0.30.0100.0538.12
5.0.20.0030.0308.33
5.0.10.0070.0308.32
5.0.00.0030.0478.05
4.4.90.0000.0275.86
4.4.80.0000.0235.86
4.4.70.0070.0235.80
4.4.60.0030.0235.87
4.4.50.0030.0235.89
4.4.40.0030.0375.91
4.4.30.0070.0205.83
4.4.20.0100.0175.87
4.4.10.0000.0275.95
4.4.00.0070.0335.81
4.3.110.0000.0305.68
4.3.100.0070.0235.75
4.3.90.0070.0175.70
4.3.80.0000.0375.67
4.3.70.0030.0235.68
4.3.60.0000.0305.69
4.3.50.0030.0235.69
4.3.40.0100.0275.75
4.3.30.0030.0204.47
4.3.20.0070.0174.51
4.3.10.0000.0234.39
4.3.00.0070.0178.30

preferences:
59.21 ms | 401 KiB | 5 Q