3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = Array ( Array ( "id" => 99, "fruit" => "Apple", "color" => "Green" ), Array ( "id" => 99, "fruit" => "Apple", "color" => "Red" ), Array ( "id" => 555, "fruit" => "Banana", "color" => "Yellow" ) ); $ids = array_column($arr, "id"); Foreach(array_unique($ids) as $id){ $new[$id] = array_values(array_intersect_key($arr, array_intersect($ids, [$id]))); } Var_dump($new);

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.5.10.0080.00916.56
8.5.00.0130.00719.78
8.4.150.0010.00114.05
8.4.140.0150.01017.33
8.4.130.0120.00819.31
8.4.120.0050.00320.63
8.4.110.0150.00522.26
8.4.100.0130.00417.50
8.4.90.0100.01118.46
8.4.80.0140.00719.40
8.4.70.0050.00417.50
8.4.60.0120.00518.86
8.4.50.0050.00318.63
8.4.40.0120.00917.59
8.4.30.0150.00617.75
8.4.20.0060.00319.54
8.4.10.0000.01017.57
8.3.280.0130.00818.51
8.3.270.0070.00416.74
8.3.260.0120.00816.41
8.3.250.0110.00818.89
8.3.240.0080.00719.05
8.3.230.0090.00216.71
8.3.220.0110.00917.42
8.3.210.0090.00916.67
8.3.200.0060.00316.64
8.3.190.0090.00917.31
8.3.180.0120.00816.44
8.3.170.0060.01217.02
8.3.160.0040.00418.38
8.3.150.0050.00516.69
8.3.140.0060.01216.40
8.3.130.0030.00718.21
8.3.120.0080.00019.10
8.3.110.0060.00320.94
8.3.100.0120.00616.59
8.3.90.0000.00826.77
8.3.80.0100.00016.50
8.3.70.0180.00416.63
8.3.60.0110.00718.31
8.3.50.0090.01118.44
8.3.40.0040.01118.71
8.3.30.0120.00318.72
8.3.20.0060.00319.17
8.3.10.0050.00321.73
8.3.00.0000.00823.48
8.2.290.0120.00620.47
8.2.280.0100.00818.57
8.2.270.0120.00617.29
8.2.260.0090.00520.61
8.2.250.0000.00816.48
8.2.240.0100.00017.00
8.2.230.0100.01022.58
8.2.220.0190.00024.06
8.2.210.0000.00726.77
8.2.200.0060.00316.25
8.2.190.0180.00316.58
8.2.180.0080.00818.41
8.2.170.0100.00722.96
8.2.160.0000.01519.41
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0040.00422.26
8.2.120.0000.00826.35
8.2.110.0070.00420.47
8.2.100.0090.00317.91
8.2.90.0060.00317.97
8.2.80.0000.00917.97
8.2.70.0050.00317.75
8.2.60.0000.00917.50
8.2.50.0040.00417.63
8.2.40.0040.00418.16
8.2.30.0050.00318.12
8.2.20.0050.00318.14
8.2.10.0000.00818.02
8.2.00.0070.00019.36
8.1.330.0090.00921.92
8.1.320.0120.00716.07
8.1.310.0120.00618.39
8.1.300.0040.00418.05
8.1.290.0030.00730.84
8.1.280.0030.01525.92
8.1.270.0080.00021.98
8.1.260.0080.00026.35
8.1.250.0000.00828.09
8.1.240.0040.00719.19
8.1.230.0060.00621.04
8.1.220.0000.00917.79
8.1.210.0060.00318.90
8.1.200.0060.00317.23
8.1.190.0080.00017.35
8.1.180.0070.00318.10
8.1.170.0040.00418.88
8.1.160.0000.00718.79
8.1.150.0050.00218.88
8.1.140.0040.00417.68
8.1.130.0070.00019.04
8.1.120.0000.01017.50
8.1.110.0000.00717.45
8.1.100.0000.00917.32
8.1.90.0000.00817.46
8.1.80.0000.00717.33
8.1.70.0040.00417.44
8.1.60.0080.00017.61
8.1.50.0030.00517.55
8.1.40.0100.00317.46
8.1.30.0000.00717.64
8.1.20.0060.00317.60
8.1.10.0080.00017.47
8.1.00.0040.00417.54
8.0.300.0000.00820.04
8.0.290.0000.00916.75
8.0.280.0000.00718.36
8.0.270.0000.00717.16
8.0.260.0060.00317.19
8.0.250.0030.00516.93
8.0.240.0040.00416.95
8.0.230.0000.00916.94
8.0.220.0030.00316.89
8.0.210.0040.00416.79
8.0.200.0030.00316.92
8.0.190.0080.00016.88
8.0.180.0000.00916.81
8.0.170.0030.00616.78
8.0.160.0000.00816.82
8.0.150.0000.00716.70
8.0.140.0050.00316.87
8.0.130.0000.00513.29
8.0.120.0000.00716.80
8.0.110.0050.00316.81
8.0.100.0000.00716.94
8.0.90.0040.00416.77
8.0.80.0100.01216.85
8.0.70.0050.00216.72
8.0.60.0050.00316.97
8.0.50.0000.00716.66
8.0.30.0110.00817.00
8.0.20.0110.01117.40
8.0.10.0040.00417.10
8.0.00.0130.00616.73
7.4.330.0050.00015.55
7.4.320.0000.00616.49
7.4.300.0050.00316.45
7.4.290.0060.00016.51
7.4.280.0040.00416.60
7.4.270.0070.00016.45
7.4.260.0030.00316.52
7.4.250.0000.00816.60
7.4.240.0000.00716.62
7.4.230.0040.00416.40
7.4.220.0030.00516.70
7.4.210.0060.01116.53
7.4.200.0040.00416.39
7.4.160.0100.00916.46
7.4.140.0120.00817.86
7.4.130.0120.00616.71
7.4.120.0090.01116.49
7.4.110.0060.01416.55
7.4.100.0070.01016.52
7.4.90.0200.00316.48
7.4.80.0060.01319.39
7.4.70.0090.00916.36
7.4.60.0160.00016.48
7.4.50.0030.01016.35
7.4.40.0080.01116.34
7.4.00.0030.01415.12
7.3.330.0080.00013.21
7.3.320.0000.00613.08
7.3.310.0030.00716.46
7.3.300.0060.00016.15
7.3.290.0030.00316.32
7.3.280.0070.00816.27
7.3.260.0110.00916.43
7.3.240.0130.00816.42
7.3.230.0160.00316.33
7.3.210.0070.01016.37
7.3.200.0070.01016.49
7.3.190.0120.00616.53
7.3.180.0030.01316.21
7.3.170.0130.00316.42
7.3.160.0140.00316.43
7.2.330.0110.00716.73
7.2.320.0090.00916.73
7.2.310.0080.00816.81
7.2.300.0090.00916.46
7.2.290.0070.01616.73
7.2.70.0630.00314.79
7.2.60.0620.01215.07
7.2.50.0730.00315.09
7.2.40.0480.00314.91
7.2.30.0550.01415.07
7.2.20.0430.00715.09
7.2.10.0340.01015.03
7.2.00.0320.01014.71
7.1.200.0000.01415.86
7.1.170.0410.00713.86
7.1.160.0510.01613.66
7.1.150.0490.00913.79
7.1.140.0560.00013.88
7.1.130.0450.01013.77
7.1.120.0340.01113.65
7.1.110.0520.01313.70
7.1.100.0410.01013.77
7.1.90.0350.00913.81
7.1.80.0380.00614.07
7.1.70.0460.00313.97
7.1.60.0870.00331.84
7.1.50.0510.00932.03
7.1.40.0460.01831.82
7.1.30.0490.01331.74
7.1.20.0540.00332.11
7.1.10.0370.01313.90
7.1.00.0420.00913.64

preferences:
20.12 ms | 403 KiB | 5 Q