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'] ]; $dupes = []; $current = []; foreach ($array as $index => $entry) { $idKey = "id[$index]"; $nameKey = "Name[$index]"; if (array_key_exists($entry[$idKey], $current)) { $dupes[] = [$entry, $current[$entry[$idKey]]]; } elseif (array_key_exists($entry[$nameKey], $current)) { $dupes[] = [$entry, $current[$entry[$nameKey]]]; } else { $current[$entry[$idKey]] = $current[$entry[$nameKey]] = $entry; } } print_r($dupes);

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.00618.38
8.3.50.0070.00718.19
8.3.40.0070.01118.84
8.3.30.0070.00718.70
8.3.20.0040.00421.76
8.3.10.0080.00018.90
8.3.00.0040.00419.51
8.2.180.0130.00318.18
8.2.170.0060.00922.96
8.2.160.0080.00820.39
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0070.00322.12
8.2.120.0000.00826.35
8.2.110.0030.00621.17
8.2.100.0090.00317.72
8.2.90.0000.00920.44
8.2.80.0040.00417.97
8.2.70.0040.00418.03
8.2.60.0040.00418.22
8.2.50.0040.00418.10
8.2.40.0050.00319.47
8.2.30.0040.00419.36
8.2.20.0000.00818.04
8.2.10.0040.00419.59
8.2.00.0040.00418.16
8.1.280.0120.00625.92
8.1.270.0060.00320.32
8.1.260.0050.00326.35
8.1.250.0040.00428.09
8.1.240.0030.00722.55
8.1.230.0070.00420.84
8.1.220.0040.00417.79
8.1.210.0050.00318.88
8.1.200.0040.00417.35
8.1.190.0050.00317.35
8.1.180.0030.00518.10
8.1.170.0080.00018.46
8.1.160.0000.00818.79
8.1.150.0000.00818.88
8.1.140.0070.00020.30
8.1.130.0000.00720.27
8.1.120.0000.00717.41
8.1.110.0030.00517.44
8.1.100.0000.00717.49
8.1.90.0030.00517.48
8.1.80.0000.00817.49
8.1.70.0060.00317.41
8.1.60.0000.00817.66
8.1.50.0070.00017.61
8.1.40.0060.00317.55
8.1.30.0050.00317.56
8.1.20.0030.00617.70
8.1.10.0040.00417.62
8.1.00.0040.00417.55
8.0.300.0040.00419.93
8.0.290.0050.00316.75
8.0.280.0000.00718.50
8.0.270.0030.00317.15
8.0.260.0000.00618.48
8.0.250.0030.00616.93
8.0.240.0000.00816.95
8.0.230.0000.00716.95
8.0.220.0000.00716.77
8.0.210.0000.00716.97
8.0.200.0030.00316.94
8.0.190.0040.00416.95
8.0.180.0000.00816.96
8.0.170.0000.00816.96
8.0.160.0050.00216.97
8.0.150.0000.00716.75
8.0.140.0070.00316.77
8.0.130.0000.00613.34
8.0.120.0000.00716.78
8.0.110.0040.00416.76
8.0.100.0000.00816.72
8.0.90.0000.00816.95
8.0.80.0080.00517.00
8.0.70.0040.00416.77
8.0.60.0040.00416.79
8.0.50.0070.00016.82
8.0.30.0100.00917.11
8.0.20.0070.01117.11
8.0.10.0000.00817.04
8.0.00.0090.01116.87
7.4.330.0020.00215.55
7.4.320.0030.00516.57
7.4.300.0000.00616.48
7.4.290.0040.00416.64
7.4.280.0000.00716.63
7.4.270.0040.00416.68
7.4.260.0030.00516.51
7.4.250.0000.00716.36
7.4.240.0050.00316.62
7.4.230.0030.00316.66
7.4.220.0080.00016.54
7.4.210.0100.00916.59
7.4.200.0040.00416.58
7.4.160.0090.00716.60
7.4.140.0010.01617.86
7.4.130.0120.00616.55
7.4.120.0130.00316.57
7.4.110.0040.01516.63
7.4.100.0180.00616.67
7.4.90.0070.01016.52
7.4.80.0040.01219.39
7.4.70.0130.01016.59
7.4.60.0070.01116.48
7.4.50.0040.01116.63
7.4.40.0090.00916.38
7.4.00.0000.01315.08
7.3.330.0030.00313.08
7.3.320.0000.00513.27
7.3.310.0000.00716.44
7.3.300.0070.00016.24
7.3.290.0000.00716.27
7.3.280.0080.00916.35
7.3.260.0120.00916.50
7.3.240.0080.01016.45
7.3.230.0060.01216.28
7.3.210.0100.00716.24
7.3.200.0060.01016.42
7.3.190.0070.01516.54
7.3.180.0100.00616.30
7.3.170.0090.01216.47
7.3.160.0090.01316.42
7.3.20.0810.01014.75
7.3.10.0900.00614.57
7.3.00.0660.00315.00
7.2.330.0070.01416.69
7.2.320.0070.01316.68
7.2.310.0110.00616.46
7.2.300.0030.01416.47
7.2.290.0110.00716.52
7.2.150.1060.00015.17
7.2.140.0930.00315.01
7.2.130.0700.00715.12
7.2.120.0740.00715.02
7.2.110.1020.00714.73
7.2.100.0850.00315.01
7.2.90.0820.00015.28
7.2.80.0820.01014.88
7.2.70.0760.00615.16
7.2.60.0780.01015.07
7.2.50.0870.00315.14
7.2.40.0710.00314.98
7.2.30.0740.00615.11
7.2.20.0980.00315.30
7.2.10.0950.00714.89
7.2.00.1240.01015.04
7.1.250.0670.00413.90

preferences:
85.1 ms | 401 KiB | 5 Q