3v4l.org

run code in 300+ PHP versions simultaneously
<?php $default = ['c2'=>0,'c3'=>0,'c4'=>0,'c5'=>0]; $years = [7,8,9]; $students = [ 20=>7, 21=>11, 420=>8, 52=>12, 55=>9 ]; $students = array_filter($students, function($year) use ($years) { return in_array($year, $years); }); $totals = array_fill_keys(array_keys($students), $default); print_r($totals);

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.00618.43
8.3.50.0110.00717.95
8.3.40.0140.00718.70
8.3.30.0090.00618.71
8.3.20.0040.00421.81
8.3.10.0080.00023.48
8.3.00.0060.00321.25
8.2.180.0090.00916.35
8.2.170.0160.00322.96
8.2.160.0100.00322.30
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00420.52
8.2.120.0050.00326.35
8.2.110.0000.00920.93
8.2.100.0090.00317.91
8.2.90.0000.00918.09
8.2.80.0090.00018.16
8.2.70.0000.00917.80
8.2.60.0030.00517.63
8.2.50.0040.00418.22
8.2.40.0000.00822.32
8.2.30.0070.00019.41
8.2.20.0040.00417.98
8.2.10.0000.00817.75
8.2.00.0000.00818.03
8.1.280.0120.00325.92
8.1.270.0080.00023.92
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00622.60
8.1.230.0060.00622.74
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0050.00317.23
8.1.190.0000.00817.23
8.1.180.0000.00818.10
8.1.170.0000.00818.50
8.1.160.0000.00718.91
8.1.150.0040.00420.19
8.1.140.0050.00217.70
8.1.130.0090.00019.01
8.1.120.0000.00717.50
8.1.110.0000.00717.36
8.1.100.0050.00217.44
8.1.90.0070.00017.33
8.1.80.0040.00417.44
8.1.70.0000.00717.45
8.1.60.0030.00617.45
8.1.50.0000.00817.59
8.1.40.0040.00417.54
8.1.30.0050.00317.49
8.1.20.0030.00617.71
8.1.10.0040.00417.48
8.1.00.0060.00617.49
8.0.300.0040.00419.88
8.0.290.0000.00716.75
8.0.280.0070.00018.39
8.0.270.0000.00717.26
8.0.260.0080.00016.93
8.0.250.0030.00316.93
8.0.240.0050.00316.96
8.0.230.0040.00316.96
8.0.220.0000.00816.94
8.0.210.0030.00316.91
8.0.200.0090.00016.83
8.0.190.0000.00716.96
8.0.180.0030.00316.95
8.0.170.0080.00016.90
8.0.160.0070.00016.98
8.0.150.0040.00416.79
8.0.140.0050.00316.87
8.0.130.0000.00513.25
8.0.120.0000.00716.87
8.0.110.0000.00716.94
8.0.100.0080.00016.76
8.0.90.0050.00216.93
8.0.80.0090.00616.91
8.0.70.0000.00816.81
8.0.60.0000.00916.95
8.0.50.0080.00016.93
8.0.30.0090.01017.03
8.0.20.0110.00817.40
8.0.10.0070.00316.86
8.0.00.0110.00716.73
7.4.330.0050.00015.55
7.4.320.0070.00016.50
7.4.300.0030.00316.61
7.4.290.0070.00016.51
7.4.280.0070.00016.52
7.4.270.0030.00316.59
7.4.260.0000.00616.61
7.4.250.0030.00316.46
7.4.240.0000.00916.52
7.4.230.0030.00316.35
7.4.220.0000.00816.71
7.4.210.0130.00516.61
7.4.200.0080.00016.61
7.4.160.0090.00716.45
7.4.140.0100.01117.86
7.4.130.0090.00916.41
7.4.120.0080.00916.51
7.4.110.0140.00316.62
7.4.100.0060.01316.56
7.4.90.0060.01516.56
7.4.80.0130.01219.39
7.4.70.0070.01016.40
7.4.60.0030.01216.31
7.4.50.0100.00716.59
7.4.40.0080.00816.34
7.4.10.0070.01415.13
7.4.00.0070.01214.98
7.3.330.0000.00613.26
7.3.320.0050.00013.16
7.3.310.0040.00416.17
7.3.300.0000.00616.30
7.3.290.0070.00016.24
7.3.280.0100.00716.28
7.3.260.0100.00816.43
7.3.240.0090.01116.38
7.3.230.0070.01016.20
7.3.210.0070.01416.34
7.3.200.0100.01016.25
7.3.190.0070.01416.22
7.3.180.0100.01016.52
7.3.170.0060.00916.49
7.3.160.0030.01416.29
7.3.130.0110.00714.93
7.3.120.0110.00714.80
7.3.110.0130.00614.73
7.3.100.0060.00614.58
7.3.90.0030.00814.82
7.3.80.0070.00714.52
7.3.70.0070.00714.70
7.3.60.0130.00314.95
7.3.50.0070.00714.71
7.3.40.0000.01214.47
7.3.30.0090.00614.77
7.3.20.0080.00816.66
7.3.10.0050.00916.49
7.3.00.0050.01016.44
7.2.330.0120.00616.71
7.2.320.0070.01016.60
7.2.310.0080.00816.59
7.2.300.0100.00616.75
7.2.290.0120.01016.73
7.2.260.0030.01415.16
7.2.250.0090.00915.07
7.2.240.0070.00715.03
7.2.230.0000.01615.03
7.2.220.0070.00715.10
7.2.210.0040.00915.16
7.2.200.0090.00614.97
7.2.190.0080.01114.73
7.2.180.0000.01014.75
7.2.170.0070.01015.10
7.2.160.0030.01015.11
7.2.150.0100.00317.01
7.2.140.0060.01216.78
7.2.130.0100.00816.50
7.2.120.0050.00716.65
7.2.110.0080.00516.54
7.2.100.0010.01216.68
7.2.90.0070.01016.74
7.2.80.0110.00516.71
7.2.70.0110.00316.59
7.2.60.0070.00716.87
7.2.50.0020.01416.65
7.2.40.0080.00516.70
7.2.30.0110.00817.07
7.2.20.0090.00917.11
7.2.10.0120.01117.10
7.2.00.0130.01117.06
7.1.330.0030.01315.57
7.1.320.0030.01415.59
7.1.310.0030.00915.54
7.1.300.0070.01015.92
7.1.290.0030.00615.73
7.1.280.0040.01115.60
7.1.270.0140.00315.46
7.1.260.0070.00315.71
7.1.250.0030.00815.72
7.1.240.0030.01015.77
7.1.230.0030.01315.40
7.1.220.0060.00315.90
7.1.210.0000.01715.81
7.1.200.0020.01115.91
7.1.190.0040.00715.40
7.1.180.0060.00315.66
7.1.170.0000.01415.82
7.1.160.0030.01015.81
7.1.150.0110.01016.15
7.1.140.0100.01216.24
7.1.130.0050.01216.21
7.1.120.0140.01016.10
7.1.110.0110.01115.88
7.1.100.0080.00915.87
7.1.90.0170.00416.00
7.1.80.0110.01215.88
7.1.70.0140.01115.46
7.1.60.0160.01424.51
7.1.50.0200.01224.20
7.1.40.0160.00924.01
7.1.30.0230.01324.25
7.1.20.0210.01324.14
7.1.10.0140.00815.31
7.1.00.0080.00615.33
7.0.330.0060.00615.31
7.0.320.0070.00715.02
7.0.310.0040.00715.36
7.0.300.0000.01215.50
7.0.290.0080.00415.36
7.0.280.0060.00315.32
7.0.270.0030.01315.21
7.0.260.0000.01515.03
7.0.250.0130.00315.36
7.0.240.0080.00315.51
7.0.230.0030.01015.35
7.0.220.0040.00415.50
7.0.210.0040.00715.21
7.0.200.0070.00715.39
7.0.190.0060.00315.32
7.0.180.0030.01315.24
7.0.170.0030.00615.57
7.0.160.0060.00915.55
7.0.150.0000.01815.41
7.0.140.0060.00315.36
7.0.130.0000.01115.38
7.0.120.0100.00615.30
7.0.110.0000.00915.15
7.0.100.0110.00415.32
7.0.90.0040.01115.18
7.0.80.0070.00715.22
7.0.70.0050.00315.26
7.0.60.0000.01115.15
7.0.50.0060.00615.46
7.0.40.0060.00913.67
7.0.30.0040.00413.29
7.0.20.0070.01013.52
7.0.10.0040.00913.48
7.0.00.0030.00613.45
5.6.400.0060.00614.23
5.6.390.0000.01514.55
5.6.380.0090.00914.19
5.6.370.0110.00414.58
5.6.360.0030.01314.16
5.6.350.0060.00914.33
5.6.340.0070.00714.32
5.6.330.0060.01014.11
5.6.320.0070.00714.11
5.6.310.0080.00314.30
5.6.300.0110.00414.32
5.6.290.0080.00414.47
5.6.280.0000.01114.13
5.6.270.0060.00914.20
5.6.260.0030.01314.50
5.6.250.0060.00314.64
5.6.240.0040.00714.41
5.6.230.0100.00314.05
5.6.220.0000.01114.23
5.6.210.0060.00614.49
5.6.200.0030.00614.37
5.6.190.0030.01414.30
5.6.180.0030.01013.98
5.6.170.0090.00313.91
5.6.160.0060.01014.36
5.6.150.0060.00914.27
5.6.140.0100.00713.96
5.6.130.0070.00714.09
5.6.120.0100.00414.27
5.6.110.0070.00414.25
5.6.100.0030.01014.20
5.6.90.0040.00714.10
5.6.80.0070.00714.58
5.6.70.0100.00313.96
5.6.60.0100.00014.10
5.6.50.0070.00313.94
5.6.40.0100.00314.21
5.6.30.0090.00614.29
5.6.20.0090.00614.28
5.6.10.0080.00514.16
5.6.00.0080.00514.22

preferences:
64.19 ms | 401 KiB | 5 Q