3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array['addition'] = array(24, 12, 6); $array['subtraction'] = array(4, 4, 2); $array['multiplication'] = array(128, 32, 8); $array['division'] = array(2, 1, 4); $dups = array(); foreach($array as $key => $value){ $dups[$key] = array_count_values($value); } print_r($dups); $currentHighest = 'addition'; foreach($dups as $type => $value){ print $type; foreach($value as $key => $value){ print $value; if($value > $currentHighest){ $currentHighest = $type; } } } print $currentHighest;

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.0120.00918.56
8.3.60.0070.01016.25
8.3.50.0120.00721.92
8.3.40.0170.00318.87
8.3.30.0090.00618.84
8.3.20.0080.00020.15
8.3.10.0000.00823.44
8.3.00.0040.00419.14
8.2.180.0070.01118.41
8.2.170.0060.01222.96
8.2.160.0030.01020.52
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00420.86
8.2.110.0040.00421.86
8.2.100.0070.00419.63
8.2.90.0030.00519.34
8.2.80.0060.00317.97
8.2.70.0060.00317.63
8.2.60.0030.00618.03
8.2.50.0000.00818.07
8.2.40.0000.00821.09
8.2.30.0040.00418.36
8.2.20.0000.00817.82
8.2.10.0040.00418.12
8.2.00.0000.00717.70
8.1.280.0220.00325.92
8.1.270.0050.00323.87
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0060.00323.92
8.1.230.0030.00919.02
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0060.00317.35
8.1.190.0030.00617.35
8.1.180.0000.00818.10
8.1.170.0080.00018.57
8.1.160.0080.00022.06
8.1.150.0040.00418.56
8.1.140.0040.00417.49
8.1.130.0030.00317.83
8.1.120.0000.00817.46
8.1.110.0050.00217.51
8.1.100.0020.00517.39
8.1.90.0040.00417.50
8.1.80.0050.00217.48
8.1.70.0030.00317.30
8.1.60.0030.00617.47
8.1.50.0000.00817.43
8.1.40.0000.00817.54
8.1.30.0050.00217.68
8.1.20.0040.00417.62
8.1.10.0000.00717.57
8.1.00.0000.00817.52
8.0.300.0000.00818.77
8.0.290.0040.00417.05
8.0.280.0030.00318.45
8.0.270.0000.00717.26
8.0.260.0040.00417.30
8.0.250.0030.00316.86
8.0.240.0040.00416.92
8.0.230.0030.00316.84
8.0.220.0030.00316.79
8.0.210.0050.00516.78
8.0.200.0030.00316.95
8.0.190.0080.00016.96
8.0.180.0040.00416.91
8.0.170.0040.00416.82
8.0.160.0000.00816.96
8.0.150.0000.00716.79
8.0.140.0000.00716.79
8.0.130.0040.00313.28
8.0.120.0030.00616.76
8.0.110.0000.00816.94
8.0.100.0070.00016.76
8.0.90.0040.00416.87
8.0.80.0090.00516.80
8.0.70.0080.00016.96
8.0.60.0040.00416.91
8.0.50.0000.00816.91
8.0.30.0080.01117.15
8.0.20.0090.00917.40
8.0.10.0070.00017.05
8.0.00.0100.00816.85
7.4.330.0040.00415.00
7.4.320.0040.00416.45
7.4.300.0000.00616.59
7.4.290.0070.00016.43
7.4.280.0040.00416.60
7.4.270.0000.00716.45
7.4.260.0040.00416.48
7.4.250.0040.00416.57
7.4.240.0020.00516.55
7.4.230.0030.00316.48
7.4.220.0060.01216.61
7.4.210.0100.00516.65
7.4.200.0040.00416.68
7.4.190.0020.00516.37
7.4.160.0130.00416.49
7.4.150.0110.00617.40
7.4.140.0120.00517.86
7.4.130.0150.00516.53
7.4.120.0110.01116.48
7.4.110.0080.00816.35
7.4.100.0080.01516.43
7.4.90.0070.01016.59
7.4.80.0100.00919.39
7.4.70.0100.00716.44
7.4.60.0150.00416.39
7.4.50.0050.00516.55
7.4.40.0090.01216.52
7.4.30.0090.00816.54
7.4.00.0000.01414.98
7.3.330.0030.00413.23
7.3.320.0030.00313.07
7.3.310.0050.00216.41
7.3.300.0030.00316.35
7.3.290.0060.01016.38
7.3.280.0050.01316.34
7.3.270.0080.00917.40
7.3.260.0120.00616.50
7.3.250.0090.01116.54
7.3.240.0100.00716.31
7.3.230.0080.00816.58
7.3.210.0150.00316.45
7.3.200.0070.01019.39
7.3.190.0080.01116.45
7.3.180.0100.00716.26
7.3.170.0060.01316.37
7.3.160.0090.01216.21
7.3.120.0040.01114.67
7.3.10.0060.00616.71
7.3.00.0000.01116.64
7.2.330.0040.01516.64
7.2.320.0090.00916.33
7.2.310.0120.01216.38
7.2.300.0080.00816.66
7.2.290.0140.00716.57
7.2.130.0040.01116.90
7.2.120.0050.00517.06
7.2.110.0110.00316.95
7.2.100.0040.00716.98
7.2.90.0050.00516.73
7.2.80.0080.00317.01
7.2.70.0080.00416.71
7.2.60.0110.00017.05
7.2.50.0040.00816.99
7.2.40.0040.01116.99
7.2.30.0060.00616.88
7.2.20.0030.01016.93
7.2.10.0040.00716.89
7.2.00.0030.00917.95
7.1.250.0040.00715.94
7.1.100.0030.00618.45
7.1.70.0060.00316.92
7.1.60.0070.01519.46
7.1.50.0110.01117.05
7.1.00.0030.07722.46
7.0.200.0090.00416.94
7.0.140.0030.07322.04
7.0.60.0030.08319.82
7.0.50.0030.04717.85
7.0.40.0070.07020.30
7.0.30.0300.05020.13
7.0.20.0230.03720.15
7.0.10.0070.04320.24
7.0.00.0100.08020.10
5.6.280.0000.07721.12
5.6.210.0170.07720.56
5.6.200.0130.05718.22
5.6.190.0000.04720.33
5.6.180.0230.07020.57
5.6.170.0170.04020.59
5.6.160.0030.08020.50
5.6.150.0000.04018.21
5.6.140.0070.05718.11
5.6.130.0030.05318.21
5.6.120.0030.04721.04
5.6.110.0270.06721.08
5.6.100.0030.07321.00
5.6.90.0030.04021.03
5.6.80.0130.08320.30
5.5.350.3900.04020.47
5.5.340.0030.04317.98
5.5.330.0000.09020.27
5.5.320.0200.06320.30
5.5.310.0230.08020.26
5.5.300.0030.04017.96
5.5.290.0100.06717.96
5.5.280.0030.08720.84
5.5.270.0200.06020.86
5.5.260.0070.04720.79
5.5.250.0130.06020.61
5.5.240.0000.07020.27
5.4.450.0130.04326.04
5.4.440.0270.05722.88
5.4.430.0270.03719.96
5.4.420.0430.04019.30
5.4.410.0400.04319.14
5.4.400.0430.03719.08
5.4.390.0230.04019.13
5.4.380.0100.08718.48
5.4.370.0070.06318.62
5.4.360.0130.05318.83
5.4.350.0130.05718.49
5.4.340.0130.05318.74
5.4.320.0060.03812.48
5.4.310.0060.03812.48
5.4.300.0090.04412.49
5.4.290.0110.04612.48
5.4.280.0100.04112.38
5.4.270.0080.04612.38
5.4.260.0100.05112.38
5.4.250.0050.05212.38
5.4.240.0070.04912.38
5.4.230.0160.06112.37
5.4.220.0140.06012.37
5.4.210.0080.05712.38
5.4.200.0110.05612.38
5.4.190.0080.05912.37
5.4.180.0090.05612.37
5.4.170.0110.05512.38
5.4.160.0110.05412.38
5.4.150.0160.06212.38
5.4.140.0080.05812.06
5.4.130.0110.05212.04
5.4.120.0150.05112.00
5.4.110.0100.05112.00
5.4.100.0100.04612.00
5.4.90.0100.05712.00
5.4.80.0090.05412.00
5.4.70.0120.05811.99
5.4.60.0100.04612.00
5.4.50.0100.05312.00
5.4.40.0120.04911.98
5.4.30.0100.04311.98
5.4.20.0090.03611.98
5.4.10.0090.03611.98
5.4.00.0120.04311.47
5.3.290.0050.04212.80
5.3.280.0090.04212.71
5.3.270.0110.05612.72
5.3.260.0110.03812.72
5.3.250.0060.04112.72
5.3.240.0050.04712.72
5.3.230.0180.06412.71
5.3.220.0130.04012.68
5.3.210.0080.04212.68
5.3.200.0130.04212.68
5.3.190.0120.04812.68
5.3.180.0100.04912.67
5.3.170.0090.06912.67
5.3.160.0110.05012.68
5.3.150.0120.04712.68
5.3.140.0120.04612.66
5.3.130.0080.06212.66
5.3.120.0030.04412.66
5.3.110.0070.04412.65
5.3.100.0060.05412.12
5.3.90.0120.05512.10
5.3.80.0120.06612.09
5.3.70.0050.05312.08
5.3.60.0170.08112.07
5.3.50.0090.05012.02
5.3.40.0150.04512.02
5.3.30.0110.04711.98
5.3.20.0160.04811.75
5.3.10.0190.04411.72
5.3.00.0160.05011.71
5.2.170.0080.0469.21
5.2.160.0080.0449.21
5.2.150.0170.0339.22
5.2.140.0100.0419.21
5.2.130.0090.0389.17
5.2.120.0060.0399.17
5.2.110.0080.0379.18
5.2.100.0130.0339.18
5.2.90.0070.0399.17
5.2.80.0100.0379.17
5.2.70.0040.0439.17
5.2.60.0060.0399.12
5.2.50.0040.0439.09
5.2.40.0050.0409.07
5.2.30.0090.0369.05
5.2.20.0050.0399.03
5.2.10.0110.0328.95
5.2.00.0050.0418.80
5.1.60.0060.0358.09
5.1.50.0070.0348.08
5.1.40.0080.0368.07
5.1.30.0070.0368.42
5.1.20.0130.0468.43
5.1.10.0090.0438.16
5.1.00.0080.0368.16
5.0.50.0080.0286.64
5.0.40.0040.0276.51
5.0.30.0100.0336.32
5.0.20.0050.0256.29
5.0.10.0050.0276.27
5.0.00.0040.0376.26
4.4.90.0060.0174.78
4.4.80.0060.0174.75
4.4.70.0070.0174.75
4.4.60.0030.0184.75
4.4.50.0060.0244.77
4.4.40.0070.0324.71
4.4.30.0060.0184.76
4.4.20.0060.0214.85
4.4.10.0040.0224.85
4.4.00.0040.0294.75
4.3.110.0030.0234.67
4.3.100.0060.0194.67
4.3.90.0080.0304.63
4.3.80.0080.0284.59
4.3.70.0060.0194.63
4.3.60.0060.0214.63
4.3.50.0090.0184.62
4.3.40.0060.0314.54
4.3.30.0060.0193.32
4.3.20.0060.0193.30
4.3.10.0060.0193.25
4.3.00.0000.01716.05

preferences:
46.32 ms | 401 KiB | 5 Q