3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ [ 'id' => 1, 'email_id' => 'ok@gmail.com', 'password' => 'test' ], [ 'id' => 2, 'email_id' => 'check@gmail.com', 'password' => 'test' ], [ 'id' => 3, 'email_id' => 'an@gmail.com', 'password' => 'pass' ] ]; $result = []; foreach ($array as $row) { if (!isset($result[$row['password']])) { $result[$row['password']] = $row; } else { if (isset($result[$row['password']]['id'])) { $result[$row['password']] = [$result[$row['password']]]; } $result[$row['password']][] = $row; } } var_export(array_values($result));

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.4.120.0110.00823.86
8.4.110.0060.00820.45
8.4.100.0110.01018.53
8.4.90.0100.00520.61
8.4.80.0070.00418.97
8.4.70.0140.00719.16
8.4.60.0130.00718.90
8.4.50.0060.00417.61
8.4.40.0070.01019.57
8.4.30.0050.01420.78
8.4.20.0130.00720.53
8.4.10.0030.00617.84
8.3.250.0130.00618.88
8.3.240.0120.00716.77
8.3.230.0130.00616.77
8.3.220.0060.00218.92
8.3.210.0040.00316.73
8.3.200.0060.00516.77
8.3.190.0120.00616.73
8.3.180.0120.00716.58
8.3.170.0150.00316.64
8.3.160.0140.00418.42
8.3.150.0040.01517.42
8.3.140.0060.00316.69
8.3.130.0000.00916.85
8.3.120.0100.00021.02
8.3.110.0040.00416.58
8.3.100.0040.00416.86
8.3.90.0040.00426.77
8.3.80.0040.00416.75
8.3.70.0120.00318.43
8.3.60.0120.00916.61
8.3.50.0180.00320.01
8.3.40.0070.01118.79
8.3.30.0070.00718.70
8.3.20.0030.00624.18
8.3.10.0040.00424.66
8.3.00.0080.00026.16
8.2.290.0080.01120.43
8.2.280.0070.00918.28
8.2.270.0080.00016.40
8.2.260.0000.00816.76
8.2.250.0050.00318.49
8.2.240.0120.00317.11
8.2.230.0060.00320.94
8.2.220.0070.00324.06
8.2.210.0130.00626.77
8.2.200.0060.00616.25
8.2.190.0070.00716.63
8.2.180.0070.00725.92
8.2.170.0140.00018.79
8.2.160.0070.00722.96
8.2.150.0000.00825.66
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0060.00318.72
8.2.110.0120.00921.07
8.2.100.0080.00417.78
8.2.90.0040.00418.15
8.2.80.0060.00318.16
8.2.70.0060.00317.63
8.2.60.0050.00317.48
8.2.50.0040.00417.55
8.2.40.0000.00819.48
8.2.30.0000.00717.68
8.2.20.0070.00018.12
8.2.10.0030.00619.36
8.2.00.0070.00019.39
8.1.330.0130.00822.01
8.1.320.0120.00816.12
8.1.310.0080.00016.70
8.1.300.0040.00417.93
8.1.290.0030.00630.84
8.1.280.0030.01325.92
8.1.270.0090.00923.77
8.1.260.0090.00026.35
8.1.250.0000.00828.09
8.1.240.0040.00823.71
8.1.230.0030.00920.75
8.1.220.0060.00317.78
8.1.210.0040.00418.77
8.1.200.0030.00517.35
8.1.190.0080.00017.35
8.1.180.0050.00318.10
8.1.170.0000.00718.94
8.1.160.0000.00718.97
8.1.150.0040.00418.65
8.1.140.0040.00418.90
8.1.130.0040.00420.28
8.1.120.0050.00317.40
8.1.110.0000.00717.52
8.1.100.0040.00417.36
8.1.90.0080.00017.41
8.1.80.0030.00317.40
8.1.70.0000.00717.49
8.1.60.0000.00717.53
8.1.50.0050.00317.45
8.1.40.0040.00417.52
8.1.30.0050.00517.52
8.1.20.0040.00417.69
8.1.10.0030.00517.63
8.1.00.0040.00417.55
8.0.300.0080.00019.98
8.0.290.0040.00416.75
8.0.280.0000.00718.04
8.0.270.0050.00316.74
8.0.260.0000.00718.60
8.0.250.0030.00316.95
8.0.240.0030.00517.01
8.0.230.0070.00016.87
8.0.220.0030.00316.95
8.0.210.0040.00416.91
8.0.200.0000.00716.93
8.0.190.0000.00716.96
8.0.180.0000.00716.84
8.0.170.0030.00616.94
8.0.160.0000.00916.86
8.0.150.0040.00416.73
8.0.140.0000.00816.78
8.0.130.0030.00313.32
8.0.120.0030.00616.80
8.0.110.0050.00316.93
8.0.100.0000.00716.69
8.0.90.0000.00716.72
8.0.80.0040.00416.89
8.0.70.0040.00416.95
8.0.60.0030.00316.80
8.0.50.0030.00316.73
8.0.30.0080.00016.94
8.0.20.0050.00316.89
8.0.10.0000.00816.93
8.0.00.0000.00717.05
7.4.330.0000.00515.55
7.4.320.0050.00216.61
7.4.300.0030.00316.63
7.4.290.0070.00016.47
7.4.280.0050.00316.62
7.4.270.0030.00316.54
7.4.260.0000.00513.30
7.4.250.0050.00216.39
7.4.240.0080.00016.48
7.4.230.0000.00716.43
7.4.220.0030.00316.43
7.4.210.0000.00816.37
7.4.200.0030.00316.66
7.4.190.0000.00816.57
7.4.180.0030.00516.68
7.4.160.0000.00816.56
7.4.150.0030.00316.58
7.4.140.0040.00416.55
7.4.130.0000.00816.52
7.4.120.0030.00516.58
7.4.110.0040.00416.38
7.4.100.0070.00016.53
7.4.90.0000.00816.25
7.4.80.0000.00816.52
7.4.70.0030.00316.22
7.4.60.0050.00216.32
7.4.50.0070.00016.26
7.4.40.0040.00416.61
7.4.30.0000.00716.60
7.4.20.0070.00016.37
7.4.10.0060.00016.22
7.4.00.0000.00716.61
7.3.330.0050.00516.33
7.3.320.0030.00313.14
7.3.310.0070.00016.21
7.3.300.0070.00016.32
7.3.290.0000.00616.32
7.3.280.0000.00616.32
7.3.270.0030.00316.36
7.3.260.0050.00216.20
7.3.250.0000.00716.34
7.3.240.0000.00716.29
7.3.230.0000.00716.33
7.3.220.0050.00316.18
7.3.210.0060.00016.17
7.3.200.0060.00016.30
7.3.190.0030.00316.12
7.3.180.0060.00016.25
7.3.170.0000.00716.23
7.3.160.0070.00016.19
7.3.150.0060.00016.13
7.3.140.0030.00316.25
7.3.130.0030.00316.28
7.3.120.0030.00316.18
7.3.110.0030.00316.25
7.3.100.0060.00016.07
7.3.90.0030.00316.45
7.3.80.0000.00716.29
7.3.70.0000.00616.30
7.3.60.0030.00316.44
7.3.50.0020.00516.44
7.3.40.0070.00016.29
7.3.30.0030.00316.40
7.3.20.0030.00318.25
7.3.10.0000.00718.12
7.3.00.0000.00718.07

preferences:
28.3 ms | 403 KiB | 5 Q