3v4l.org

run code in 300+ PHP versions simultaneously
<?php // user input of years $ar = [1944, 1674, 3021]; // sort the array from lowest to highest $arSorted = sort($ar, SORT_NATURAL | SORT_FLAG_CASE); // find max year $maxCentury = max(...$ar); // get max century $roundedCentury = round($maxCentury, -3); // create a counter $i = 0; foreach(range(0, $roundedCentury, 1000) as $century) { if($century <= $arSorted[$i]) { echo "<li> $century <ul>" . $arSorted[$i++] . "</ul> </li>"; } }

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.70.0070.01016.50
8.3.60.0110.00416.50
8.3.50.0110.00922.04
8.3.40.0100.00718.79
8.3.30.0110.00418.83
8.3.20.0000.00819.05
8.3.10.0080.00022.04
8.3.00.0080.00020.90
8.2.180.0180.00316.63
8.2.170.0070.00722.96
8.2.160.0170.00020.59
8.2.150.0000.00725.66
8.2.140.0110.00724.66
8.2.130.0040.00421.05
8.2.120.0040.00426.35
8.2.110.0070.00321.09
8.2.100.0110.00018.16
8.2.90.0060.00319.17
8.2.80.0080.00017.97
8.2.70.0040.00418.05
8.2.60.0030.00617.93
8.2.50.0000.00818.10
8.2.40.0080.00020.71
8.2.30.0040.00419.31
8.2.20.0000.00718.18
8.2.10.0000.00718.12
8.2.00.0040.00417.87
8.1.280.0090.01225.92
8.1.270.0080.00022.11
8.1.260.0000.00728.09
8.1.250.0050.00228.09
8.1.240.0000.00921.24
8.1.230.0080.00417.95
8.1.220.0060.00317.88
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0040.00817.47
8.1.180.0000.00818.10
8.1.170.0000.00818.68
8.1.160.0050.00318.90
8.1.150.0040.00420.38
8.1.140.0000.00719.55
8.1.130.0030.00317.78
8.1.120.0070.00017.42
8.1.110.0040.00417.44
8.1.100.0030.00317.51
8.1.90.0030.00317.52
8.1.80.0070.00017.53
8.1.70.0000.00717.51
8.1.60.0020.00517.59
8.1.50.0030.00517.59
8.1.40.0040.00417.60
8.1.30.0000.00817.61
8.1.20.0030.00517.75
8.1.10.0000.00817.54
8.1.00.0000.00917.46
8.0.300.0070.00018.77
8.0.290.0090.00017.00
8.0.280.0000.00818.41
8.0.270.0040.00417.32
8.0.260.0060.00017.24
8.0.250.0050.00317.00
8.0.240.0040.00416.98
8.0.230.0080.00017.12
8.0.220.0030.00316.91
8.0.210.0080.00017.04
8.0.200.0040.00417.07
8.0.190.0040.00417.10
8.0.180.0000.00717.00
8.0.170.0040.00417.10
8.0.160.0070.00017.02
8.0.150.0070.00017.04
8.0.140.0040.00416.86
8.0.130.0030.00313.48
8.0.120.0070.00316.99
8.0.110.0080.00016.88
8.0.100.0040.00416.88
8.0.90.0000.00816.87
8.0.80.0070.01116.98
8.0.70.0040.00417.05
8.0.60.0040.00416.91
8.0.50.0040.00416.90
8.0.30.0080.01117.17
8.0.20.0130.01117.40
8.0.10.0030.00617.14
8.0.00.0190.00316.63
7.4.330.0030.00315.55
7.4.320.0000.00616.54
7.4.300.0060.00016.48
7.4.290.0000.00716.57
7.4.280.0040.00416.57
7.4.270.0040.00416.66
7.4.260.0000.00716.69
7.4.250.0000.00816.60
7.4.240.0070.00016.66
7.4.230.0000.00716.56
7.4.220.0170.00716.72
7.4.210.0050.01316.62
7.4.200.0000.00716.50
7.4.160.0090.00716.48
7.4.150.0150.00417.40
7.4.140.0100.01017.86
7.4.130.0090.01016.67
7.4.120.0040.01316.58
7.4.110.0150.00616.59
7.4.100.0130.00316.57
7.4.90.0070.01116.54
7.4.80.0030.01619.39
7.4.70.0040.01216.66
7.4.60.0090.00616.65
7.4.50.0030.01316.43
7.4.40.0070.01016.54
7.4.30.0140.00316.69
7.4.10.0030.01315.00
7.4.00.0070.01015.10
7.3.330.0070.00013.13
7.3.320.0050.00013.30
7.3.310.0080.00016.39
7.3.300.0030.00316.38
7.3.290.0060.00316.29
7.3.280.0080.01016.42
7.3.270.0140.00417.40
7.3.260.0090.00816.43
7.3.250.0100.00716.44
7.3.240.0070.01216.55
7.3.230.0070.01016.52
7.3.210.0150.00616.71
7.3.200.0130.00316.44
7.3.190.0060.00916.64
7.3.180.0120.00416.39
7.3.170.0130.00316.49
7.3.160.0110.00716.41
7.3.130.0060.01114.82
7.3.120.0020.01614.68
7.3.110.0080.01014.72
7.3.100.0090.00714.66
7.3.90.0100.00614.56
7.3.80.0050.00914.87
7.3.70.0080.00714.90
7.3.60.0030.01114.69
7.3.50.0050.00614.84
7.3.40.0110.00314.72
7.3.30.0080.00414.78
7.3.20.0060.00816.68
7.3.10.0050.00716.60
7.3.00.0070.00816.61
7.2.330.0130.00316.94
7.2.320.0090.00916.93
7.2.310.0100.00716.82
7.2.300.0070.01016.84
7.2.290.0160.00616.56
7.2.260.0070.01115.18
7.2.250.0090.00915.25
7.2.240.0080.00915.26
7.2.230.0120.00515.16
7.2.220.0080.00515.07
7.2.210.0070.00615.14
7.2.200.0070.00514.95
7.2.190.0030.01014.94
7.2.180.0060.00515.02
7.2.170.0030.01215.07
7.2.160.0060.00614.96
7.2.150.0040.00816.81
7.2.140.0050.00816.82
7.2.130.0030.01016.74
7.2.120.0070.00716.86
7.2.110.0050.00616.82
7.2.100.0080.00416.99
7.2.90.0050.00716.91
7.2.80.0040.00916.90
7.2.70.0020.01117.00
7.2.60.0060.00916.86
7.2.50.0050.00916.96
7.2.40.0050.00816.97
7.2.30.0040.00716.94
7.2.20.0050.00616.92
7.2.10.0070.00916.89
7.2.00.0040.00817.56
7.1.330.0100.00315.52
7.1.320.0090.00515.96
7.1.310.0070.00715.85
7.1.300.0100.00615.73
7.1.290.0090.00415.54
7.1.280.0050.00715.68
7.1.270.0020.01115.72
7.1.260.0070.00815.67
7.1.250.0060.00715.69
7.1.240.0070.00315.79
7.1.230.0030.01015.79
7.1.220.0070.00615.85
7.1.210.0050.00715.77
7.1.200.0050.00715.78
7.1.190.0070.00615.81
7.1.180.0030.00915.68
7.1.170.0040.00815.97
7.1.160.0070.00515.66
7.1.150.0030.00615.75
7.1.140.0060.00515.85
7.1.130.0060.01015.85
7.1.120.0050.00715.83
7.1.110.0030.00815.70
7.1.100.0110.00315.56
7.1.90.0050.00615.86
7.1.80.0080.00415.67
7.1.70.0040.00916.17
7.1.60.0070.00416.27
7.1.50.0080.00515.81
7.1.40.0030.01015.85
7.1.30.0050.00715.70
7.1.20.0060.00615.91
7.1.10.0070.00715.68
7.1.00.0040.03117.97
7.0.330.0070.00615.32
7.0.320.0030.00815.44
7.0.310.0030.00715.14
7.0.300.0070.00515.42
7.0.290.0060.00715.40
7.0.280.0000.00915.28
7.0.270.0070.00815.44
7.0.260.0050.00715.58
7.0.250.0060.00715.27
7.0.240.0050.01015.34
7.0.230.0030.00615.44
7.0.220.0040.00915.42
7.0.210.0020.00915.22
7.0.200.0070.00715.29
7.0.190.0070.00315.27
7.0.180.0060.00615.32
7.0.170.0060.00315.43
7.0.160.0050.00515.40
7.0.150.0030.00815.23
7.0.140.0020.01215.29
7.0.130.0060.01917.63
7.0.120.0060.02517.53
7.0.110.0050.02417.52
7.0.100.0040.02417.72
7.0.90.0070.02517.67
7.0.80.0080.02417.68
7.0.70.0100.02017.51
7.0.60.0060.02217.65
7.0.50.0060.02717.64
7.0.40.0020.02516.28
7.0.30.0070.03216.31
7.0.20.0080.02116.36
7.0.10.0060.02616.38
7.0.00.0030.02916.37
5.6.400.0000.01214.45
5.6.390.0040.00714.42
5.6.380.0000.01114.40
5.6.370.0030.00914.21
5.6.360.0100.00514.61
5.6.350.0030.01014.18
5.6.340.0080.00514.41
5.6.330.0050.01114.64
5.6.320.0040.01114.42
5.6.310.0030.00914.54
5.6.300.0040.00714.42
5.6.290.0070.00714.53
5.6.280.0090.01716.71
5.6.270.0060.02316.66
5.6.260.0040.02416.57
5.6.250.0060.02316.64
5.6.240.0050.02316.56
5.6.230.0100.01916.52
5.6.220.0030.02616.66
5.6.210.0120.02416.60
5.6.200.0060.02516.53
5.6.190.0080.02116.51
5.6.180.0060.02216.50
5.6.170.0130.02716.45
5.6.160.0080.02016.55
5.6.150.0040.02616.55
5.6.140.0060.02416.56
5.6.130.0120.02716.55
5.6.120.0060.02916.46
5.6.110.0050.02616.67
5.6.100.0040.02616.71
5.6.90.0080.02516.52
5.6.80.0070.03116.23
5.6.70.0070.02216.18
5.6.60.0050.02616.40
5.6.50.0040.02716.49
5.6.40.0100.01916.30
5.6.30.0100.02816.35
5.6.20.0080.02816.11
5.6.10.0070.03216.38
5.6.00.0080.01916.23

preferences:
59.76 ms | 401 KiB | 5 Q