3v4l.org

run code in 300+ PHP versions simultaneously
<?php $records = [ ['id' => 1], ['id' => 2], ['id' => 3], ['id' => 4], ['id' => 4], ['id' => 4], ['id' => 5] ]; $r = array_count_values(array_column($records, 'id')); foreach($r as $k => $v){ echo $k; echo ($v>1) ? " ({$v})" : ''; echo ''."\n"; }

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.0060.01218.38
8.3.50.0120.00318.09
8.3.40.0160.00718.88
8.3.30.0090.00618.36
8.3.20.0070.00023.70
8.3.10.0040.00421.74
8.3.00.0040.00422.46
8.2.180.0070.01418.14
8.2.170.0110.00422.96
8.2.160.0100.00719.30
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00426.16
8.2.110.0060.00320.52
8.2.100.0070.00417.78
8.2.90.0000.00818.03
8.2.80.0030.00617.97
8.2.70.0000.00917.50
8.2.60.0050.00318.05
8.2.50.0080.00018.07
8.2.40.0060.00319.88
8.2.30.0050.00317.98
8.2.20.0060.00317.98
8.2.10.0000.00719.30
8.2.00.0000.00819.18
8.1.280.0120.00325.92
8.1.270.0090.00020.67
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00320.76
8.1.230.0110.00022.13
8.1.220.0040.00417.78
8.1.210.0040.00418.77
8.1.200.0060.00317.25
8.1.190.0060.00317.22
8.1.180.0000.00818.10
8.1.170.0040.00418.57
8.1.160.0000.00818.82
8.1.150.0040.00418.89
8.1.140.0040.00420.88
8.1.130.0030.00320.13
8.1.120.0030.00617.43
8.1.110.0080.00017.41
8.1.100.0070.00017.42
8.1.90.0000.00817.37
8.1.80.0040.00417.36
8.1.70.0000.00817.44
8.1.60.0030.00617.61
8.1.50.0080.00017.53
8.1.40.0050.00317.41
8.1.30.0070.00417.54
8.1.20.0050.00317.58
8.1.10.0070.00017.41
8.1.00.0040.00417.30
8.0.300.0000.00719.89
8.0.290.0040.00416.63
8.0.280.0050.00218.43
8.0.270.0000.00717.20
8.0.260.0040.00419.94
8.0.250.0050.00216.89
8.0.240.0040.00416.93
8.0.230.0070.00016.93
8.0.220.0050.00216.82
8.0.210.0000.01016.89
8.0.200.0030.00316.97
8.0.190.0030.00316.99
8.0.180.0050.00216.96
8.0.170.0030.00616.87
8.0.160.0040.00416.88
8.0.150.0040.00416.71
8.0.140.0020.00516.78
8.0.130.0000.00513.30
8.0.120.0040.00416.93
8.0.110.0040.00416.89
8.0.100.0070.00016.88
8.0.90.0030.00616.83
8.0.80.0100.00716.81
8.0.70.0030.00416.86
8.0.60.0050.00316.80
8.0.50.0030.00516.68
8.0.30.0000.01716.86
8.0.20.0060.01516.98
8.0.10.0030.00317.08
8.0.00.0160.00716.92
7.4.330.0050.00015.55
7.4.320.0000.00616.56
7.4.300.0000.00616.35
7.4.290.0050.00216.49
7.4.280.0040.00416.58
7.4.270.0070.00016.50
7.4.260.0030.00313.29
7.4.250.0000.00816.51
7.4.240.0000.00716.55
7.4.230.0030.00316.43
7.4.220.0000.00716.27
7.4.210.0030.01016.56
7.4.200.0000.00716.68
7.4.140.0030.01517.86
7.4.130.0130.00416.46
7.4.120.0110.00716.52
7.4.110.0110.00616.54
7.4.100.0060.01116.64
7.4.90.0090.00916.36
7.4.80.0120.00419.39
7.4.70.0110.00616.61
7.4.60.0070.01416.51
7.4.50.0060.00916.32
7.4.40.0040.01116.55
7.4.00.0100.00714.73
7.3.330.0080.00016.16
7.3.320.0000.00513.16
7.3.310.0020.00516.40
7.3.300.0000.00716.37
7.3.290.0040.01416.25
7.3.260.0080.01016.40
7.3.240.0080.00916.47
7.3.230.0060.01216.58
7.3.210.0170.00016.62
7.3.200.0130.01016.61
7.3.190.0130.00316.30
7.3.180.0110.00916.64
7.3.170.0130.01016.26
7.3.160.0120.00316.30
7.3.90.0120.00314.95
7.3.80.0080.00815.02
7.3.70.0080.00814.82
7.3.60.0080.01014.89
7.3.50.0070.01314.77
7.3.40.0030.01614.79
7.3.30.0080.01114.66
7.3.20.0060.01614.66
7.3.10.0120.00914.86
7.3.00.0110.01114.86
7.2.330.0060.01216.66
7.2.320.0120.00616.63
7.2.310.0100.00716.75
7.2.300.0090.01216.65
7.2.290.0100.00716.52
7.2.220.0070.01014.88
7.2.210.0100.01014.98
7.2.200.0120.00815.10
7.2.190.0030.01314.84
7.2.180.0070.01114.78
7.2.170.0060.01414.78
7.2.160.0110.00714.77
7.2.150.0090.01515.13
7.2.140.0140.01015.15
7.2.130.0190.00414.88
7.2.120.0070.01014.99
7.2.110.0070.01014.84
7.2.100.0110.00615.21
7.2.90.0090.00915.16
7.2.80.0060.01115.15
7.2.70.0060.01015.27
7.2.60.0030.01914.99
7.2.50.0080.00815.20
7.2.40.0160.00515.19
7.2.30.0090.00614.93
7.2.20.0120.00315.19
7.2.10.0100.01315.05
7.2.00.0130.00715.27
7.1.320.0110.01114.10
7.1.310.0150.00614.02
7.1.300.0080.01514.14
7.1.290.0110.01114.07
7.1.280.0040.01713.88
7.1.270.0150.00514.15
7.1.260.0100.00614.03
7.1.250.0140.00714.09

preferences:
34.95 ms | 400 KiB | 5 Q