3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array ( 0 => array ( 'company' => 1, 'product' => 5, ), 1 => array ( 'company' => 2, 'product' => 4, ), 2 => array ( 'company' => 6, 'product' => 5, ), 3 => array ( 'company' => 2, 'product' => 3, ), ); foreach ($array as $set) { if (!isset($result[$set['product']])) { $result[$set['product']] = $set; } else { $result[$set['product']]['company'] .= ",{$set['company']}"; } } var_export(array_values($result));

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.4.120.0030.00522.37
8.4.110.0090.01122.65
8.4.100.0110.01017.61
8.4.90.0100.01117.81
8.4.80.0100.01017.84
8.4.70.0130.00817.55
8.4.60.0090.00718.91
8.4.50.0140.00719.50
8.4.40.0100.01019.56
8.4.30.0160.00317.80
8.4.20.0070.00319.48
8.4.10.0000.00917.77
8.3.250.0080.01219.01
8.3.240.0060.00216.58
8.3.230.0130.00616.63
8.3.220.0100.00816.63
8.3.210.0030.00416.80
8.3.200.0030.00616.68
8.3.190.0040.00417.24
8.3.180.0090.00916.79
8.3.170.0110.00718.77
8.3.160.0130.00618.64
8.3.150.0080.01120.92
8.3.140.0060.00316.61
8.3.130.0000.00818.20
8.3.120.0090.00019.00
8.3.110.0060.00320.94
8.3.100.0080.00024.06
8.3.90.0040.00426.77
8.3.80.0030.00617.97
8.3.70.0170.00718.18
8.3.60.0090.00618.18
8.3.50.0050.00717.35
8.3.40.0180.00418.60
8.3.30.0150.00018.67
8.3.20.0080.00019.18
8.3.10.0080.00021.91
8.3.00.0040.00423.43
8.2.290.0160.00518.94
8.2.280.0040.00318.80
8.2.270.0120.00617.08
8.2.260.0120.00618.63
8.2.250.0040.00416.50
8.2.240.0000.00818.71
8.2.230.0000.00822.58
8.2.220.0060.00337.54
8.2.210.0150.00326.77
8.2.200.0060.00316.50
8.2.190.0150.00016.58
8.2.180.0090.00616.35
8.2.170.0100.00619.13
8.2.160.0150.00422.96
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0040.00420.74
8.2.110.0080.00322.25
8.2.100.0060.00617.72
8.2.90.0040.00418.03
8.2.80.0050.00317.97
8.2.70.0080.00018.04
8.2.60.0040.00418.05
8.2.50.0060.00318.10
8.2.40.0020.00519.45
8.2.30.0080.00019.22
8.2.20.0080.00018.03
8.2.10.0040.00419.36
8.2.00.0000.00719.54
8.1.330.0090.01016.17
8.1.320.0070.00216.21
8.1.310.0160.00316.86
8.1.300.0000.00917.86
8.1.290.0090.00018.88
8.1.280.0150.00625.92
8.1.270.0050.00222.20
8.1.260.0040.00426.35
8.1.250.0110.00028.09
8.1.240.0100.00022.61
8.1.230.0100.00320.97
8.1.220.0040.00417.79
8.1.210.0060.00318.92
8.1.200.0090.00017.38
8.1.190.0030.00517.23
8.1.180.0000.00818.10
8.1.170.0000.00818.74
8.1.160.0050.00218.82
8.1.150.0080.00018.84
8.1.140.0030.00619.60
8.1.130.0090.00018.89
8.1.120.0030.00417.47
8.1.110.0040.00417.34
8.1.100.0000.00717.44
8.1.90.0080.00017.35
8.1.80.0000.00817.43
8.1.70.0000.00717.36
8.1.60.0090.00017.62
8.1.50.0050.00317.48
8.1.40.0050.00217.50
8.1.30.0030.00617.58
8.1.20.0030.00517.64
8.1.10.0000.00717.47
8.1.00.0040.00417.40
8.0.300.0040.00419.98
8.0.290.0040.00416.63
8.0.280.0000.00718.41
8.0.270.0040.00317.13
8.0.260.0030.00317.15
8.0.250.0040.00416.96
8.0.240.0000.00716.89
8.0.230.0000.00716.78
8.0.220.0040.00416.89
8.0.210.0100.00016.90
8.0.200.0030.00516.94
8.0.190.0000.00816.92
8.0.180.0040.00416.95
8.0.170.0030.00616.93
8.0.160.0090.00016.91
8.0.150.0000.01116.84
8.0.140.0040.00416.87
8.0.130.0000.00513.35
8.0.120.0030.00516.79
8.0.110.0040.00416.88
8.0.100.0040.00416.79
8.0.90.0000.00716.93
8.0.80.0110.00716.83
8.0.70.0040.00417.00
8.0.60.0080.00016.82
8.0.50.0040.00416.88
8.0.30.0090.00917.07
8.0.20.0080.01217.40
8.0.10.0000.00717.03
8.0.00.0080.01216.85
7.4.330.0050.00015.55
7.4.320.0060.00016.61
7.4.300.0030.00316.50
7.4.290.0000.00816.51
7.4.280.0110.00016.61
7.4.270.0090.00016.61
7.4.260.0040.00416.50
7.4.250.0000.00716.46
7.4.240.0040.00416.51
7.4.230.0050.00316.43
7.4.220.0000.00716.70
7.4.210.0100.00516.62
7.4.200.0030.00316.53
7.4.160.0080.00916.50
7.4.140.0130.00817.86
7.4.130.0100.01016.50
7.4.120.0100.00716.41
7.4.110.0030.01316.50
7.4.100.0040.01416.34
7.4.90.0120.01216.56
7.4.80.0160.00319.39
7.4.70.0120.00416.55
7.4.60.0160.00316.50
7.4.50.0060.00616.41
7.4.40.0180.00016.48
7.4.00.0020.01615.01
7.3.330.0000.00513.12
7.3.320.0060.00013.16
7.3.310.0050.00216.34
7.3.300.0030.00316.43
7.3.290.0030.00316.17
7.3.280.0060.01016.36
7.3.260.0110.01016.49
7.3.240.0110.00816.49
7.3.230.0130.00316.61
7.3.210.0070.01016.43
7.3.200.0100.00616.56
7.3.190.0090.00616.45
7.3.180.0030.01316.22
7.3.170.0070.01016.62
7.3.160.0040.01216.59
7.3.120.0030.01615.02
7.3.110.0040.01414.67
7.3.100.0000.01814.79
7.3.90.0100.00315.04
7.3.80.0080.00814.91
7.3.70.0000.00914.79
7.3.60.0030.01314.88
7.3.50.0110.00014.84
7.3.40.0070.00714.94
7.3.30.0060.00314.66
7.3.20.0060.00916.84
7.3.10.0080.00816.76
7.3.00.0090.00316.77
7.2.330.0120.00616.74
7.2.320.0040.01316.46
7.2.310.0070.01616.40
7.2.300.0150.00016.73
7.2.290.0180.00016.82
7.2.250.0040.01115.25
7.2.240.0060.01214.83
7.2.230.0030.01215.13
7.2.220.0080.00815.19
7.2.210.0110.00715.05
7.2.200.0060.00614.80
7.2.190.0000.00914.92
7.2.180.0060.01014.69
7.2.170.0100.00315.23
7.2.160.0000.01415.17
7.2.150.0120.00616.91
7.2.140.0060.01217.08
7.2.130.0030.01117.06
7.2.120.0000.01216.84
7.2.110.0060.01317.05
7.2.100.0060.01216.89
7.2.90.0030.00917.16
7.2.80.0230.00815.94
7.2.70.0120.00915.97
7.2.60.0160.00616.05
7.2.50.0150.00815.91
7.2.40.0140.00816.00
7.2.30.0140.00715.88
7.2.20.0160.00715.99
7.2.10.0150.00715.90
7.2.00.0210.00215.78
7.1.330.0070.01015.82
7.1.320.0070.00715.80
7.1.310.0120.00316.02
7.1.300.0090.00615.50
7.1.290.0040.01415.84
7.1.280.0030.01015.84
7.1.270.0060.00915.62
7.1.260.0070.00715.85
7.1.250.0030.00615.66
7.1.240.0060.00915.99
7.1.230.0070.00715.81
7.1.220.0090.00615.80
7.1.210.0060.00615.50
7.1.200.0050.00515.53
7.1.190.0100.01214.89
7.1.180.0170.00714.77
7.1.170.0100.01214.89
7.1.160.0120.00914.97
7.1.150.0170.00314.95
7.1.140.0110.00814.94
7.1.130.0170.00814.95
7.1.120.0150.01014.89
7.1.110.0110.00714.91
7.1.100.0170.00514.65
7.1.90.0180.01114.84
7.1.80.0180.00614.68
7.1.70.0150.01014.90
7.1.60.0170.01523.71
7.1.50.0220.01523.79
7.1.40.0260.00823.74
7.1.30.0270.00523.82
7.1.20.0220.00923.67
7.1.10.0650.01014.89
7.1.00.0110.00814.76
7.0.330.0000.01315.49
7.0.320.0060.00315.27
7.0.310.0100.00715.22
7.0.300.0040.01115.46
7.0.290.0070.00715.47
7.0.280.0000.01215.28
7.0.270.0090.00315.48
7.0.260.0000.00915.11
7.0.250.0040.00815.45
7.0.240.0000.01215.37
7.0.230.0030.01015.45
7.0.220.0050.00515.45
7.0.210.0000.00915.37
7.0.200.0120.00315.32
7.0.190.0040.01215.55
7.0.180.0080.00815.38
7.0.170.0040.00715.39
7.0.160.0040.00915.24
7.0.150.0060.00615.45
7.0.140.0060.00315.42
7.0.130.0050.00515.39
7.0.120.0030.00615.56
7.0.110.0090.00315.43
7.0.100.0000.00815.36
7.0.90.0080.00315.45
7.0.80.0090.00315.62
7.0.70.0030.01615.44
7.0.60.0030.01015.27
7.0.50.0100.00315.27
7.0.40.0030.01013.53
7.0.30.0060.00313.24
7.0.20.0070.00713.53
7.0.10.0000.01013.56
7.0.00.0030.00613.48
5.6.400.0100.00314.57
5.6.390.0000.01213.96
5.6.380.0070.00714.56
5.6.370.0100.00714.41
5.6.360.0000.01414.68
5.6.350.0100.00614.65
5.6.340.0000.01014.61
5.6.330.0060.00614.67
5.6.320.0030.01014.59
5.6.310.0030.00614.40
5.6.300.0000.01614.23
5.6.290.0070.00414.64
5.6.280.0000.00914.61
5.6.270.0030.01014.57
5.6.260.0090.00614.73
5.6.250.0000.01214.17
5.6.240.0030.01314.25
5.6.230.0060.00314.36
5.6.220.0100.00914.47
5.6.210.0000.00814.40
5.6.200.0030.00714.58
5.6.190.0030.01014.54
5.6.180.0000.01314.20
5.6.170.0030.01014.28
5.6.160.0110.00314.33
5.6.150.0110.00014.32
5.6.140.0100.00314.67
5.6.130.0000.01414.31
5.6.120.0040.01114.24
5.6.110.0040.00414.12
5.6.100.0030.01014.17
5.6.90.0080.00014.77
5.6.80.0050.00514.63
5.6.70.0000.01214.23
5.6.60.0030.01014.46
5.6.50.0070.00714.58
5.6.40.0030.01014.43
5.6.30.0030.00514.05
5.6.20.0040.00414.32
5.6.10.0030.00614.29
5.6.00.0040.00814.27

preferences:
29.61 ms | 403 KiB | 5 Q