3v4l.org

run code in 300+ PHP versions simultaneously
<?php function unique_multidim_array($array, $key) { $uniq = []; foreach($array as $val) { $curVal = $val[$key]; // shortcut of the value $uniq[$curVal] = $val; // override previous value if exists } return array_values($uniq); // array_values to re-index array } $exists = [ ['intervention_id' => 2, 'exists' => 'yes'], ['intervention_id' => 2, 'exists' => 'no'], ['intervention_id' => 2, 'exists' => 'yes'], ['intervention_id' => 5, 'exists' => 'yes'], ['intervention_id' => 6, 'exists' => 'no'], ['intervention_id' => 12, 'exists' => 'yes'], ]; $uniq = unique_multidim_array($exists, 'intervention_id'); print_r($uniq);

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.0100.00716.63
8.3.50.0080.00820.30
8.3.40.0070.00719.73
8.3.30.0110.00718.77
8.3.20.0080.00024.18
8.3.10.0070.00724.66
8.3.00.0080.00026.16
8.2.180.0080.00825.92
8.2.170.0100.01019.13
8.2.160.0130.00022.96
8.2.150.0060.00325.66
8.2.140.0000.00724.66
8.2.130.0070.00026.16
8.2.120.0080.00026.16
8.2.110.0080.00321.05
8.2.100.0080.00419.58
8.2.90.0000.00817.75
8.2.80.0050.00318.86
8.2.70.0040.00417.50
8.2.60.0080.00017.93
8.2.50.0000.00817.98
8.2.40.0030.00618.34
8.2.30.0050.00218.05
8.2.20.0050.00220.52
8.2.10.0040.00417.63
8.2.00.0000.00719.23
8.1.280.0090.00925.92
8.1.270.0030.00622.14
8.1.260.0080.00026.35
8.1.250.0030.00728.09
8.1.240.0060.00323.97
8.1.230.0080.00417.77
8.1.220.0100.00017.74
8.1.210.0050.00318.77
8.1.200.0080.00017.25
8.1.190.0000.00817.23
8.1.180.0040.00818.10
8.1.170.0000.00817.65
8.1.160.0070.00018.80
8.1.150.0070.00018.52
8.1.140.0060.00317.45
8.1.130.0030.00318.80
8.1.120.0060.00317.48
8.1.110.0030.00517.37
8.1.100.0040.00417.42
8.1.90.0040.00317.47
8.1.80.0030.00617.38
8.1.70.0000.00717.52
8.1.60.0080.00017.48
8.1.50.0090.00017.53
8.1.40.0050.00317.41
8.1.30.0000.00817.70
8.1.20.0150.00017.68
8.1.10.0170.00717.41
8.1.00.0190.00517.34
8.0.300.0040.00418.77
8.0.290.0020.00516.63
8.0.280.0000.00818.44
8.0.270.0040.00416.75
8.0.260.0070.00018.49
8.0.250.0000.00716.95
8.0.240.0000.00716.98
8.0.230.0030.00316.89
8.0.220.0070.00016.79
8.0.210.0070.00016.89
8.0.200.0030.00616.97
8.0.190.0000.00716.84
8.0.180.0050.00316.93
8.0.170.0060.00316.93
8.0.160.0070.00716.84
8.0.150.0140.00416.87
8.0.140.0130.00616.77
8.0.130.0170.00316.78
8.0.120.0130.00616.89
8.0.110.0150.00416.81
8.0.100.0130.00516.74
8.0.90.0180.00316.85
8.0.80.0170.00316.79
8.0.70.0150.00516.78
8.0.60.0220.00016.80
8.0.50.0150.00416.79
8.0.30.0140.00516.86
8.0.20.0210.00216.96
8.0.10.0160.00316.96
7.4.330.0000.00515.55
7.4.320.0030.00316.58
7.4.300.0060.00016.63
7.4.290.0040.00416.35
7.4.280.0030.00616.55
7.4.270.0150.00516.54
7.4.260.0080.00916.41
7.4.250.0100.00516.48
7.4.240.0130.00316.47
7.4.230.0090.00916.60
7.4.220.0110.00616.54
7.4.210.0160.00416.58
7.4.200.0150.00516.48
7.4.190.0170.00316.44
7.4.180.0150.00516.49
7.4.160.0100.00816.64
7.4.150.0160.00316.55
7.4.140.0170.00216.38
7.4.130.0150.00616.42
7.4.120.0150.00516.38
7.4.110.0120.00616.45
7.4.100.0120.00416.47
7.4.90.0110.00616.47
7.4.80.0110.00716.38
7.4.70.0150.00416.32
7.4.60.0110.00816.44
7.4.50.0140.00416.35
7.4.40.0130.00516.31
7.4.30.0140.00416.38
7.4.20.0140.00416.43
7.4.10.0170.00216.45
7.4.00.0150.00316.44

preferences:
66.94 ms | 401 KiB | 5 Q