3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ [ 'id' => 10, 'name' => 'John', 'occupation' => 'engineer', 'points' => 10 ], [ 'id' => 10, 'name' => 'John', 'occupation' => 'librarian', 'points' => 14 ], [ 'id' => 7, 'name' => 'Sarah', 'occupation' => 'artist', 'points' => 21 ], [ 'id' => 7, 'name' => 'Sarah', 'occupation' => 'teacher', 'points' => 17 ], [ 'id' => 10, 'name' => 'John', 'occupation' => 'butcher', 'points' => 7 ], [ 'id' => 7, 'name' => 'Sarah', 'occupation' => 'engineer', 'points' => 9 ], [ 'id' => 25, 'name' => 'Andreea', 'occupation' => 'judge', 'points' => 11 ] ]; $result = []; foreach($arr as $v){ $result[$v["id"]][] = $v; } print_r($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.5.00.0090.01219.99
8.4.150.0030.00014.05
8.4.140.0130.00717.25
8.4.130.0120.00817.61
8.4.120.0130.00820.22
8.4.110.0130.00718.69
8.4.100.0120.00818.82
8.4.90.0110.00522.46
8.4.80.0110.00818.88
8.4.70.0140.00519.68
8.4.60.0120.00718.60
8.4.50.0060.00319.50
8.4.40.0120.00919.52
8.4.30.0130.00620.42
8.4.20.0120.00919.42
8.4.10.0160.00319.45
8.3.280.0150.00718.50
8.3.270.0130.00716.77
8.3.260.0110.01216.47
8.3.250.0120.00818.97
8.3.240.0120.00916.82
8.3.230.0100.00916.90
8.3.220.0040.00319.09
8.3.210.0070.01116.85
8.3.200.0040.00416.80
8.3.190.0100.00816.62
8.3.180.0110.00316.78
8.3.170.0100.00716.67
8.3.160.0120.00616.66
8.3.150.0030.00719.04
8.3.140.0070.01120.55
8.3.130.0080.00018.47
8.3.120.0120.00620.68
8.3.110.0030.00620.94
8.3.100.0070.00024.06
8.3.90.0050.00326.77
8.3.80.0060.00318.56
8.3.70.0130.01016.75
8.3.60.0110.00718.68
8.3.50.0080.00424.54
8.3.40.0110.01118.71
8.3.30.0100.00318.68
8.3.20.0000.00920.97
8.3.10.0110.00420.34
8.3.00.0040.00420.51
8.2.290.0090.01019.05
8.2.280.0080.01118.30
8.2.270.0170.00317.43
8.2.260.0080.00016.38
8.2.250.0110.00718.35
8.2.240.0030.00617.29
8.2.230.0060.00322.58
8.2.220.0060.00337.54
8.2.210.0040.00426.77
8.2.200.0060.00316.38
8.2.190.0090.00616.58
8.2.180.0100.00718.17
8.2.170.0120.00322.96
8.2.160.0000.01420.43
8.2.150.0030.00624.18
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0040.00419.66
8.2.110.0110.00022.25
8.2.100.0080.00417.91
8.2.90.0090.00018.03
8.2.80.0040.00419.28
8.2.70.0000.00817.75
8.2.60.0080.00017.63
8.2.50.0000.00817.55
8.2.40.0060.00519.35
8.2.30.0080.00019.26
8.2.20.0040.00418.07
8.2.10.0030.00518.86
8.2.00.0030.00519.15
8.1.330.0120.00618.14
8.1.320.0040.00417.75
8.1.310.0120.00620.17
8.1.300.0060.00316.31
8.1.290.0060.00318.88
8.1.280.0060.01025.92
8.1.270.0070.00024.66
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0070.01122.16
8.1.230.0040.00720.90
8.1.220.0040.00417.78
8.1.210.0040.00418.77
8.1.200.0030.00517.35
8.1.190.0040.00417.22
8.1.180.0050.00318.10
8.1.170.0030.00618.57
8.1.160.0030.00320.26
8.1.150.0040.00418.80
8.1.140.0040.00420.65
8.1.130.0050.00217.36
8.1.120.0000.00717.38
8.1.110.0040.00417.34
8.1.100.0000.01017.35
8.1.90.0040.00417.46
8.1.80.0000.00817.37
8.1.70.0050.00317.50
8.1.60.0000.00817.61
8.1.50.0000.00817.55
8.1.40.0000.00817.50
8.1.30.0050.00317.51
8.1.20.0000.00817.68
8.1.10.0030.00517.39
8.1.00.0000.00917.38
8.0.300.0040.00420.10
8.0.290.0040.00416.75
8.0.280.0030.00318.38
8.0.270.0000.00717.30
8.0.260.0000.00716.86
8.0.250.0000.00716.85
8.0.240.0000.00716.84
8.0.230.0030.00316.92
8.0.220.0040.00416.80
8.0.210.0050.00316.85
8.0.200.0000.00716.94
8.0.190.0030.00516.96
8.0.180.0030.00516.92
8.0.170.0030.00516.91
8.0.160.0040.00416.78
8.0.150.0000.00716.74
8.0.140.0040.00416.80
8.0.130.0060.00013.32
8.0.120.0030.00516.82
8.0.110.0030.00416.67
8.0.100.0040.00416.76
8.0.90.0090.00016.86
8.0.80.0060.00916.89
8.0.70.0030.00316.92
8.0.60.0040.00416.75
8.0.50.0000.00716.68
8.0.30.0100.00717.32
8.0.20.0100.01017.17
8.0.10.0040.00417.08
8.0.00.0130.00616.79
7.4.330.0050.00015.55
7.4.320.0000.00616.52
7.4.300.0060.00016.45
7.4.290.0000.00716.51
7.4.280.0020.00516.60
7.4.270.0070.00016.50
7.4.260.0030.00313.32
7.4.250.0030.00316.51
7.4.240.0060.00116.50
7.4.230.0030.00316.70
7.4.220.0030.00516.53
7.4.210.0080.00916.59
7.4.200.0030.00316.53
7.4.140.0330.00717.86
7.4.130.0100.01316.32
7.4.120.0110.01316.35
7.4.110.0150.00316.45
7.4.100.0040.01316.55
7.4.90.0030.01616.45
7.4.80.0070.01419.39
7.4.70.0090.00616.54
7.4.60.0110.00716.44
7.4.50.0050.00916.43
7.4.40.0100.00716.56
7.4.00.0080.00914.87
7.3.330.0030.00316.19
7.3.320.0060.00013.19
7.3.310.0030.00316.31
7.3.300.0000.00716.34
7.3.290.0070.00016.26
7.3.280.0000.01616.32
7.3.260.0140.00716.35
7.3.230.0090.01216.54
7.3.210.0090.00916.43
7.3.200.0070.01016.44
7.3.190.0030.01716.60
7.3.180.0060.00916.32
7.3.170.0060.01016.38
7.3.160.0150.00016.47
7.3.120.0090.00514.74
7.3.110.0050.01014.65
7.3.100.0080.00714.73
7.3.90.0070.00914.87
7.3.80.0070.00714.88
7.3.70.0050.00914.78
7.3.60.0070.00714.72
7.3.50.0110.00114.76
7.3.40.0070.00714.81
7.3.30.0070.00514.96
7.3.20.0110.00515.61
7.3.10.0100.00615.65
7.3.00.0080.00715.51
7.2.330.0030.01316.70
7.2.320.0130.00616.73
7.2.310.0160.00016.68
7.2.300.0060.01616.36
7.2.290.0130.00916.75
7.2.250.0060.00614.78
7.2.240.0060.01015.09
7.2.230.0100.00914.97
7.2.220.0120.00515.06
7.2.210.0090.00514.95
7.2.200.0060.00815.06
7.2.190.0050.00915.09
7.2.180.0050.01015.03
7.2.170.0050.01015.12
7.2.160.0090.00615.12
7.2.150.0160.00314.95
7.2.140.0120.00815.15
7.2.130.0090.00615.20
7.2.120.0090.00615.15
7.2.110.0090.00615.13
7.2.100.0000.01615.09
7.2.90.0000.01615.36
7.2.80.0090.00715.04
7.2.70.0050.01015.05
7.2.60.0140.00814.99
7.2.50.0110.00514.75
7.2.40.0060.01315.05
7.2.30.0000.01515.18
7.2.20.0040.01614.85
7.2.10.0030.01415.10
7.2.00.0110.00514.88
7.1.330.0070.01014.91
7.1.320.0080.00714.68
7.1.310.0130.00315.09
7.1.300.0080.00714.96
7.1.290.0050.00714.81
7.1.280.0060.01115.01
7.1.270.0060.00914.74
7.1.260.0050.00814.72
7.1.250.0070.00713.79

preferences:
34.64 ms | 403 KiB | 5 Q