3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ 'id[0]' => 'BX-78', 'Name[0]' => 'XXX', 'Address[0]' => 'YUUSATD' ], [ 'id[1]' => 'BX-79', 'Name[1]' => 'YYY', 'Address[1]' => 'DHJSHDJGY' ], [ 'id[2]' => 'BX-80', 'Name[2]' => 'ZZZ', 'Address[2]' => 'DDSDSDA' ], [ 'id[3]' => 'BX-78', 'Name[3]' => 'AAA', 'Address[3]' => 'FSDSDS' ], [ 'id[4]' => 'BX-81', 'Name[4]' => 'XXX', 'Address[4]' => 'DSDSDSD' ] ]; foreach ($array as $index => $a) { foreach ($array as $v) { if ($v === $a) continue; if (reset($v) === reset($a)) $array[$index]["id"] = "duplicate"; if (next($v) === next($a)) $array[$index]["name"] = "duplicate"; } } $array = array_reduce($array, function($carry, $item) { if (array_key_exists("id", $item) || array_key_exists("name", $item)) { unset($item["id"], $item["name"]); $carry[] = $item; } return $carry; }, []); print_r($array);

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.0090.00916.75
8.3.50.0040.01118.16
8.3.40.0120.00618.84
8.3.30.0090.00618.79
8.3.20.0080.00021.89
8.3.10.0000.00820.48
8.3.00.0060.00319.27
8.2.180.0150.00418.41
8.2.170.0120.00922.96
8.2.160.0040.01120.34
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0030.00620.38
8.2.120.0040.00426.35
8.2.110.0070.00322.29
8.2.100.0110.00017.78
8.2.90.0050.00220.59
8.2.80.0000.00818.04
8.2.70.0060.00317.93
8.2.60.0050.00318.16
8.2.50.0040.00418.10
8.2.40.0050.00321.20
8.2.30.0000.00819.21
8.2.20.0000.00818.20
8.2.10.0000.00719.56
8.2.00.0000.00718.03
8.1.280.0120.00925.92
8.1.270.0040.00420.20
8.1.260.0050.00326.35
8.1.250.0080.00028.09
8.1.240.0000.01022.60
8.1.230.0070.00420.97
8.1.220.0040.00417.79
8.1.210.0080.00018.88
8.1.200.0060.00317.35
8.1.190.0060.00317.22
8.1.180.0080.00018.10
8.1.170.0060.00318.52
8.1.160.0040.00418.85
8.1.150.0040.00418.85
8.1.140.0030.00320.34
8.1.130.0000.00720.20
8.1.120.0000.00817.42
8.1.110.0070.00017.34
8.1.100.0080.00017.47
8.1.90.0050.00217.37
8.1.80.0000.00817.38
8.1.70.0050.00317.50
8.1.60.0030.00517.58
8.1.50.0080.00017.55
8.1.40.0050.00317.54
8.1.30.0080.00017.58
8.1.20.0030.00617.70
8.1.10.0050.00217.64
8.1.00.0050.00317.50
8.0.300.0000.00819.90
8.0.290.0000.00816.75
8.0.280.0000.00818.46
8.0.270.0000.00717.23
8.0.260.0000.00818.53
8.0.250.0070.00016.87
8.0.240.0070.00016.98
8.0.230.0040.00316.94
8.0.220.0030.00316.91
8.0.210.0030.00516.82
8.0.200.0000.00616.86
8.0.190.0040.00416.97
8.0.180.0040.00416.82
8.0.170.0000.00816.95
8.0.160.0040.00416.91
8.0.150.0060.00316.80
8.0.140.0000.00716.86
8.0.130.0030.00313.29
8.0.120.0000.00816.93
8.0.110.0050.00216.96
8.0.100.0040.00416.81
8.0.90.0070.00016.77
8.0.80.0100.01016.88
8.0.70.0050.00317.02
8.0.60.0000.00816.86
8.0.50.0000.00716.92
8.0.30.0110.00617.03
8.0.20.0120.00617.09
8.0.10.0040.00416.91
8.0.00.0140.00516.91
7.4.330.0000.00415.55
7.4.320.0000.00816.55
7.4.300.0030.00316.51
7.4.290.0030.00316.61
7.4.280.0000.00816.64
7.4.270.0030.00316.63
7.4.260.0030.00516.53
7.4.250.0050.00216.48
7.4.240.0030.00316.52
7.4.230.0030.00316.64
7.4.220.0040.00416.52
7.4.210.0040.01216.49
7.4.200.0050.00216.65
7.4.160.0080.01116.46
7.4.140.0120.00617.86
7.4.130.0090.00916.55
7.4.120.0060.01616.53
7.4.110.0000.01716.54
7.4.100.0080.00816.47
7.4.90.0000.01816.52
7.4.80.0130.00319.39
7.4.70.0100.00616.61
7.4.60.0000.02016.55
7.4.50.0060.00616.21
7.4.40.0070.01016.55
7.4.00.0100.00615.03
7.3.330.0050.00013.40
7.3.320.0030.00313.40
7.3.310.0000.00716.41
7.3.300.0000.00716.28
7.3.290.0070.00016.41
7.3.280.0060.01316.36
7.3.260.0100.01016.52
7.3.240.0110.00816.48
7.3.230.0120.00616.46
7.3.210.0170.00016.48
7.3.200.0100.00616.54
7.3.190.0110.00716.68
7.3.180.0090.00916.57
7.3.170.0070.01016.59
7.3.160.0120.00316.43
7.3.120.0100.01015.14
7.3.110.0140.00014.99
7.3.100.0040.01114.70
7.3.90.0000.01014.98
7.3.80.0060.01214.77
7.3.70.0040.00714.88
7.3.60.0030.01015.01
7.3.50.0060.00315.08
7.3.40.0090.00314.70
7.3.30.0030.00614.79
7.3.20.1040.00715.61
7.3.10.0960.01315.55
7.3.00.1360.00315.73
7.2.330.0090.00916.86
7.2.320.0150.00316.59
7.2.310.0110.00716.55
7.2.300.0080.00816.58
7.2.290.0140.00416.54
7.2.250.0070.01115.20
7.2.240.0060.01314.84
7.2.230.0070.00715.32
7.2.220.0040.00714.96
7.2.210.0030.01515.13
7.2.200.0000.01615.05
7.2.190.0000.01015.19
7.2.180.0060.00615.16
7.2.170.0000.01415.24
7.2.150.2040.00015.00
7.2.140.2780.00714.95
7.2.130.1700.01314.86
7.2.120.1990.00714.96
7.2.110.3750.01015.14
7.2.100.2940.01014.93
7.2.90.2820.00714.96
7.2.80.2120.02214.92
7.2.70.3360.01714.99
7.2.60.3830.00715.12
7.2.50.3330.00714.93
7.2.40.4130.01314.94
7.2.30.2950.00714.66
7.2.20.2910.01015.03
7.2.10.2660.01014.87
7.2.00.3130.01014.79
7.1.330.0030.01216.00
7.1.320.0090.00615.58
7.1.310.0070.00715.89
7.1.300.0060.00315.76
7.1.290.0030.01015.59
7.1.280.0120.00315.67
7.1.270.0040.00415.98
7.1.260.0070.00715.82
7.1.250.1680.00613.45

preferences:
33.55 ms | 400 KiB | 5 Q