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){ $temp = array_values(array_intersect_key($arr, array_intersect($ids, [$id]))); $new[$id] = ['fruit' => $temp[0]['fruit'], 'color' => array_column($temp, "color")]; } 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.0150.00416.68
8.5.00.0130.01019.94
8.4.160.0140.00723.75
8.4.150.0020.00014.05
8.4.140.0130.00817.49
8.4.130.0090.01117.68
8.4.120.0040.00520.58
8.4.110.0140.00518.61
8.4.100.0100.00920.67
8.4.90.0090.01119.02
8.4.80.0050.00320.48
8.4.70.0070.01117.85
8.4.60.0040.00419.14
8.4.50.0100.00918.43
8.4.40.0160.00617.93
8.4.30.0070.01017.87
8.4.20.0070.01019.42
8.4.10.0000.00917.95
8.3.280.0120.00720.11
8.3.270.0110.01016.79
8.3.260.0080.01116.77
8.3.250.0070.00518.83
8.3.240.0140.00616.72
8.3.230.0140.00416.50
8.3.220.0090.00919.00
8.3.210.0030.00418.34
8.3.200.0030.00616.68
8.3.190.0060.00317.11
8.3.180.0130.00616.73
8.3.170.0160.00320.60
8.3.160.0070.01117.21
8.3.150.0150.00319.11
8.3.140.0040.00416.79
8.3.130.0000.00917.29
8.3.120.0000.00918.85
8.3.110.0030.00720.94
8.3.100.0080.00324.06
8.3.90.0060.01226.77
8.3.80.0060.00316.63
8.3.70.0090.00916.58
8.3.60.0040.01418.55
8.3.50.0090.00818.47
8.3.40.0150.00018.57
8.3.30.0140.00018.32
8.3.20.0040.00418.95
8.3.10.0040.00421.95
8.3.00.0080.00023.65
8.2.290.0080.01020.70
8.2.280.0110.01018.46
8.2.270.0070.01418.99
8.2.260.0080.00018.67
8.2.250.0060.00317.05
8.2.240.0060.00319.16
8.2.230.0030.00622.58
8.2.220.0000.01137.54
8.2.210.0000.00826.77
8.2.200.0030.00616.50
8.2.190.0040.01816.63
8.2.180.0110.00418.17
8.2.170.0070.00722.96
8.2.160.0030.01220.52
8.2.150.0040.00424.18
8.2.140.0000.00924.66
8.2.130.0000.00726.16
8.2.120.0060.00321.00
8.2.110.0100.00021.02
8.2.100.0080.00417.91
8.2.90.0050.00319.53
8.2.80.0000.00817.97
8.2.70.0030.00617.93
8.2.60.0100.00018.05
8.2.50.0040.00418.10
8.2.40.0040.00419.05
8.2.30.0070.00019.40
8.2.20.0040.00418.01
8.2.10.0000.00818.14
8.2.00.0030.00319.47
8.1.330.0110.00721.96
8.1.320.0150.00416.22
8.1.310.0080.00016.92
8.1.300.0030.00620.25
8.1.290.0030.00618.88
8.1.280.0160.00325.92
8.1.270.0050.00224.66
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00322.65
8.1.230.0080.00420.89
8.1.220.0040.00417.74
8.1.210.0090.00018.85
8.1.200.0060.00317.25
8.1.190.0080.00017.35
8.1.180.0060.00318.10
8.1.170.0080.00018.88
8.1.160.0000.00718.95
8.1.150.0070.00018.84
8.1.140.0080.00017.67
8.1.130.0080.00017.37
8.1.120.0030.00517.32
8.1.110.0040.00417.47
8.1.100.0060.00317.47
8.1.90.0000.00917.46
8.1.80.0020.00517.44
8.1.70.0100.00017.38
8.1.60.0040.00417.58
8.1.50.0040.00417.56
8.1.40.0030.00917.57
8.1.30.0000.00817.68
8.1.20.0040.00417.60
8.1.10.0040.00417.61
8.1.00.0050.00317.41
8.0.300.0060.00320.09
8.0.290.0040.00416.75
8.0.280.0000.00718.49
8.0.270.0030.00316.75
8.0.260.0030.00316.75
8.0.250.0070.00016.84
8.0.240.0040.00416.92
8.0.230.0000.00716.96
8.0.220.0050.00216.77
8.0.210.0030.00316.90
8.0.200.0050.00217.03
8.0.190.0040.00416.86
8.0.180.0020.00516.89
8.0.170.0030.00516.76
8.0.160.0000.00716.89
8.0.150.0040.00416.72
8.0.140.0070.00016.86
8.0.130.0060.00013.36
8.0.120.0050.00216.90
8.0.110.0040.00416.80
8.0.100.0050.00217.00
8.0.90.0070.00016.89
8.0.80.0090.00416.92
8.0.70.0040.00416.92
8.0.60.0000.00816.74
8.0.50.0000.00716.84
8.0.30.0110.00917.18
8.0.20.0060.01217.41
8.0.10.0040.00416.85
8.0.00.0080.01316.77
7.4.330.0030.00315.55
7.4.320.0000.00616.45
7.4.300.0030.00316.58
7.4.290.0000.00816.66
7.4.280.0040.00416.41
7.4.270.0000.00716.49
7.4.260.0070.00016.53
7.4.250.0040.00416.55
7.4.240.0050.00316.52
7.4.230.0030.00316.46
7.4.220.0050.00316.60
7.4.210.0060.00916.44
7.4.200.0000.00716.59
7.4.160.0090.01016.46
7.4.140.0090.01117.86
7.4.130.0110.00716.63
7.4.120.0110.00816.51
7.4.110.0110.00716.66
7.4.100.0110.00716.64
7.4.90.0120.00616.54
7.4.80.0070.01619.39
7.4.70.0110.00716.38
7.4.60.0080.00816.57
7.4.50.0040.01116.61
7.4.40.0100.00716.41
7.4.00.0100.00714.85
7.3.330.0040.00213.20
7.3.320.0000.00613.24
7.3.310.0000.00716.24
7.3.300.0030.00316.30
7.3.290.0000.00716.32
7.3.280.0050.01016.30
7.3.260.0080.01116.50
7.3.240.0070.01116.52
7.3.230.0090.01016.48
7.3.210.0120.00916.40
7.3.200.0070.01016.33
7.3.190.0070.01016.44
7.3.180.0040.01216.52
7.3.170.0140.00316.37
7.3.160.0100.01016.57
7.2.330.0150.00916.74
7.2.320.0080.01116.74
7.2.310.0090.00916.65
7.2.300.0110.00616.68
7.2.290.0080.01216.65
7.2.70.0310.00314.88
7.2.60.0940.01614.90
7.2.50.0460.00715.00
7.2.40.0380.01015.12
7.2.30.0370.01115.02
7.2.20.0490.00514.89
7.2.10.0340.01115.06
7.2.00.0300.01015.05
7.1.200.0030.00615.70
7.1.170.0290.01513.87
7.1.160.0300.00413.84
7.1.150.0410.00913.78
7.1.140.0340.00713.84
7.1.130.0420.01213.94
7.1.120.0450.00713.85
7.1.110.0370.01013.95
7.1.100.0260.01013.83
7.1.90.0350.01013.86
7.1.80.0380.00613.98
7.1.70.0350.00613.99
7.1.60.1240.01232.04
7.1.50.0520.01731.92
7.1.40.0880.01531.92
7.1.30.0460.01331.59
7.1.20.0470.01431.85
7.1.10.0380.00513.78
7.1.00.0340.01113.78
7.0.300.0410.00513.58
7.0.290.0320.01813.30
7.0.270.0410.01113.11
7.0.260.0340.00913.32
7.0.250.0450.00313.62
7.0.240.0560.00613.70
7.0.230.0310.01513.39
7.0.220.0450.00613.21
7.0.210.0360.00713.50
7.0.200.0350.01113.24
7.0.190.0420.01113.50
7.0.180.0380.01113.18
7.0.170.0430.00313.57
7.0.160.0300.01013.58
7.0.150.0410.00413.46
7.0.140.0430.00713.38
7.0.130.0350.00013.32
7.0.120.0340.00713.65
7.0.110.0300.00313.46
7.0.100.0410.00413.59
7.0.90.0250.00713.63
7.0.80.0420.00813.35
7.0.70.0320.00713.63
7.0.60.0410.00613.67
7.0.50.0320.01413.60
7.0.40.0360.00713.65
7.0.30.0400.00813.84
7.0.20.0500.00813.59
7.0.10.0450.00413.46
7.0.00.0430.01013.39
5.6.300.0130.00914.09
5.6.290.0090.01614.17
5.6.280.0150.00614.50
5.6.270.0140.00714.29
5.6.260.0110.01214.55
5.6.250.0060.01214.24
5.6.240.0110.00814.35
5.6.230.0160.00614.22
5.6.220.0110.01414.30
5.6.210.0140.01414.30
5.6.200.0200.00514.24
5.6.190.0140.00614.25
5.6.180.0200.00314.34
5.6.170.0210.00614.29
5.6.160.0100.01614.14
5.6.150.0180.01114.32
5.6.140.0200.00614.19
5.6.130.0150.01014.46
5.6.120.0200.00614.20
5.6.110.0090.01214.33
5.6.100.0120.00914.18
5.6.90.0170.00814.30
5.6.80.0250.00014.57
5.6.70.0130.01314.30
5.6.60.0200.00414.17
5.6.50.0140.00714.13
5.6.40.0110.01614.52
5.6.30.0100.01514.22
5.6.20.0170.00414.21
5.6.10.0080.01613.96
5.6.00.0210.00414.33
5.5.380.0110.00410.94
5.5.370.0090.00911.06
5.5.360.0130.00711.11
5.5.350.0080.01211.25
5.5.340.0140.00611.10
5.5.330.0190.00011.10
5.5.320.0140.00411.05
5.5.310.0100.00811.13
5.5.300.0180.00011.26
5.5.290.0140.00511.20
5.5.280.0070.01311.30
5.5.270.0140.00611.22
5.5.260.0130.00611.15
5.5.250.0100.01011.11
5.5.240.0150.00011.22
5.5.230.0050.01511.10
5.5.220.0160.00211.12
5.5.210.0160.00011.04
5.5.200.0100.01010.91
5.5.190.0170.00310.93
5.5.180.0160.00011.00
5.5.160.0090.00911.16
5.5.150.0090.00611.15
5.5.140.0040.01210.95
5.5.130.0170.00011.20
5.5.120.0050.01111.08
5.5.110.0100.00911.11
5.5.100.0080.01011.33
5.5.90.0120.00810.94
5.5.80.0100.00511.21
5.5.70.0110.00611.12
5.5.60.0170.00011.02
5.5.50.0120.00611.21
5.5.40.0090.01010.99
5.5.30.0140.00310.76
5.5.20.0140.00411.13
5.5.10.0130.00310.75
5.5.00.0080.01211.04
5.4.450.0110.00710.57
5.4.440.0090.00910.94
5.4.430.0110.00810.88
5.4.420.0120.00610.88
5.4.410.0120.00510.96
5.4.400.0090.00910.85
5.4.390.0150.00410.75
5.4.380.0190.00010.85
5.4.370.0060.01110.78
5.4.360.0060.01210.91
5.4.350.0050.01210.61
5.4.340.0120.00610.75
5.4.320.0110.00810.75
5.4.310.0130.00610.78
5.4.300.0060.01210.83
5.4.290.0070.01210.89
5.4.280.0070.00710.68
5.4.270.0150.00410.65
5.4.260.0120.00610.84
5.4.250.0150.00010.88
5.4.240.0070.00810.52
5.4.230.0120.00710.70
5.4.220.0120.00610.86
5.4.210.0130.00410.75
5.4.200.0140.00610.74
5.4.190.0060.01310.78
5.4.180.0050.01110.75
5.4.170.0030.01710.68
5.4.160.0120.00410.59
5.4.150.0070.01110.80
5.4.140.0070.01310.84
5.4.130.0100.00310.88
5.4.120.0140.00010.80
5.4.110.0070.00910.68
5.4.100.0070.01010.50
5.4.90.0170.00010.75
5.4.80.0040.01210.76
5.4.70.0110.00410.99
5.4.60.0140.00410.56
5.4.50.0120.00610.59
5.4.40.0080.00810.76
5.4.30.0080.00510.94
5.4.20.0120.00610.78
5.4.10.0130.00410.55
5.4.00.0130.00310.96
5.3.290.0170.00010.29
5.3.280.0130.00410.20
5.3.270.0140.0079.99
5.3.260.0040.01310.06
5.3.250.0080.00910.18
5.3.240.0110.0059.87
5.3.230.0000.01410.15
5.3.220.0130.00010.09
5.3.210.0150.00010.10
5.3.200.0070.01010.20
5.3.190.0110.00510.11
5.3.180.0050.00910.30
5.3.170.0150.00010.29
5.3.160.0070.00710.28
5.3.150.0070.00810.23
5.3.140.0080.00810.21
5.3.130.0130.0039.99
5.3.120.0070.01110.16
5.3.110.0110.00610.32
5.3.100.0140.00310.24
5.3.90.0090.00910.28
5.3.80.0120.00310.18
5.3.70.0130.0049.97
5.3.60.0140.00310.04
5.3.50.0130.00310.20
5.3.40.0090.00610.00
5.3.30.0080.0089.97
5.3.20.0110.0029.95
5.3.10.0140.0039.92
5.3.00.0120.0009.93
5.2.170.0110.0079.18
5.2.160.0040.0089.36
5.2.150.0140.0009.25
5.2.140.0070.0079.22
5.2.130.0070.0069.20
5.2.120.0060.0068.96
5.2.110.0100.0039.22
5.2.100.0110.0029.27
5.2.90.0090.0059.21
5.2.80.0080.0059.14
5.2.70.0060.0089.06
5.2.60.0070.0078.86
5.2.50.0120.0009.29
5.2.40.0100.0039.17
5.2.30.0070.0079.14
5.2.20.0100.0038.97
5.2.10.0090.0039.00
5.2.00.0090.0028.86
5.1.60.0050.0058.86
5.1.50.0000.0098.86
5.1.40.0060.0068.86
5.1.30.0000.0128.86
5.1.20.0060.0068.86
5.1.10.0100.0008.86
5.1.00.0060.0038.86
5.0.50.0070.0058.86
5.0.40.0070.0048.86
5.0.30.0090.0008.86
5.0.20.0070.0038.86
5.0.10.0050.0068.86
5.0.00.0060.0038.86
4.4.90.0050.0038.86
4.4.80.0080.0008.86
4.4.70.0040.0048.86
4.4.60.0040.0048.86
4.4.50.0060.0038.86
4.4.40.0080.0008.86
4.4.30.0060.0008.86
4.4.20.0100.0008.86
4.4.10.0000.0088.86
4.4.00.0040.0048.86
4.3.110.0050.0058.86
4.3.100.0030.0068.86
4.3.90.0000.0088.86
4.3.80.0050.0038.86
4.3.70.0060.0038.86
4.3.60.0050.0028.86
4.3.50.0020.0058.86
4.3.40.0020.0058.86
4.3.30.0070.0008.86
4.3.20.0060.0008.86
4.3.10.0040.0048.86
4.3.00.0000.0078.86

preferences:
44.26 ms | 403 KiB | 5 Q