3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = Array ( '0' => Array ( 'location_id' => 1, 'property_id' => 10 ), '1' => Array ( 'location_id' => 2, 'property_id' => 20 ), '2' => Array ( 'location_id' => 3, 'property_id' => 10 ), '3' => Array ( 'location_id' => 4, 'property_id' => 10 ), '4' => Array ( 'location_id' => 5, 'property_id' => 10 ), '5' => Array ( 'location_id' => 6, 'property_id' => 20 ) ); $r = []; foreach($a as $v){ if(isset($r[$v['property_id']])){ array_push($r[$v['property_id']]['location_id'], $v['location_id']); }else{ $r[$v['property_id']] = [ 'property_id' => $v['property_id'], 'location_id' => [$v['location_id']] ]; } } print_r(array_values($r));

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.140.0140.00717.81
8.4.130.0150.00517.43
8.4.120.0040.00420.74
8.4.110.0130.00818.84
8.4.100.0070.00517.89
8.4.90.0130.00818.61
8.4.80.0070.00320.47
8.4.70.0090.00917.94
8.4.60.0080.00218.70
8.4.50.0140.00618.78
8.4.40.0040.01217.74
8.4.30.0130.01018.73
8.4.20.0070.00319.13
8.4.10.0040.00417.54
8.3.270.0090.01016.77
8.3.260.0100.01016.72
8.3.250.0150.00319.00
8.3.240.0110.00916.75
8.3.230.0140.00416.83
8.3.220.0070.00819.17
8.3.210.0100.00816.77
8.3.200.0050.00516.84
8.3.190.0100.00817.13
8.3.180.0080.00917.29
8.3.170.0040.01522.91
8.3.160.0080.00817.43
8.3.150.0130.00620.75
8.3.140.0000.01017.03
8.3.130.0030.00618.46
8.3.120.0040.00419.09
8.3.110.0120.00420.94
8.3.100.0060.00318.34
8.3.90.0040.00418.30
8.3.80.0030.00618.56
8.3.70.0100.01016.63
8.3.60.0070.01416.75
8.3.50.0060.00618.19
8.3.40.0100.00718.72
8.3.30.0110.00418.67
8.3.20.0030.00522.17
8.3.10.0080.00022.04
8.3.00.0040.00422.29
8.2.290.0120.00720.32
8.2.280.0070.01118.41
8.2.270.0110.00717.21
8.2.260.0040.00416.65
8.2.250.0030.00518.49
8.2.240.0080.00017.32
8.2.230.0040.00422.58
8.2.220.0000.00924.06
8.2.210.0100.00326.77
8.2.200.0090.00016.75
8.2.190.0070.00718.10
8.2.180.0120.00318.29
8.2.170.0040.01122.96
8.2.160.0000.01320.38
8.2.150.0030.00724.18
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0070.00020.94
8.2.110.0070.00322.08
8.2.100.0040.00817.97
8.2.90.0080.00018.22
8.2.80.0000.00817.97
8.2.70.0000.00818.03
8.2.60.0030.00618.22
8.2.50.0000.00818.10
8.2.40.0060.00319.42
8.2.30.0040.00419.35
8.2.20.0030.00518.13
8.2.10.0000.00719.32
8.2.00.0000.00719.31
8.1.330.0130.00522.09
8.1.320.0100.00917.85
8.1.310.0040.00418.63
8.1.300.0060.01218.57
8.1.290.0030.00618.88
8.1.280.0030.01425.92
8.1.270.0050.00523.99
8.1.260.0050.00326.35
8.1.250.0030.00528.09
8.1.240.0040.00422.18
8.1.230.0080.00420.95
8.1.220.0090.00017.78
8.1.210.0030.00618.77
8.1.200.0060.00317.38
8.1.190.0080.00017.22
8.1.180.0000.00718.10
8.1.170.0030.00518.48
8.1.160.0000.00918.98
8.1.150.0000.00718.77
8.1.140.0040.00420.94
8.1.130.0030.00320.10
8.1.120.0040.00417.48
8.1.110.0040.00417.43
8.1.100.0110.00017.41
8.1.90.0000.00717.53
8.1.80.0040.00717.50
8.1.70.0000.00917.41
8.1.60.0000.00817.63
8.1.50.0040.00417.52
8.1.40.0050.00317.55
8.1.30.0030.00717.69
8.1.20.0050.00417.68
8.1.10.0040.00417.65
8.1.00.0000.00817.38
8.0.300.0070.00019.68
8.0.290.0040.00416.75
8.0.280.0000.00818.44
8.0.270.0030.00317.20
8.0.260.0030.00620.13
8.0.250.0000.00917.02
8.0.240.0030.00316.90
8.0.230.0030.00316.88
8.0.220.0000.00716.89
8.0.210.0000.00716.94
8.0.200.0060.00017.00
8.0.190.0000.00817.04
8.0.180.0040.00416.82
8.0.170.0040.00416.89
8.0.160.0000.00716.93
8.0.150.0030.00316.87
8.0.140.0000.00716.79
8.0.130.0060.00013.34
8.0.120.0040.00416.88
8.0.110.0000.00816.72
8.0.100.0000.00716.94
8.0.90.0000.00716.75
8.0.80.0110.00316.96
8.0.70.0000.00716.77
8.0.60.0030.00516.76
8.0.50.0070.00016.81
8.0.30.0060.01216.90
8.0.20.0150.00617.22
8.0.10.0040.00417.02
8.0.00.0100.01316.71
7.4.330.0000.00616.67
7.4.320.0000.00616.50
7.4.300.0030.00316.61
7.4.290.0030.00316.52
7.4.280.0040.00416.49
7.4.270.0030.00316.63
7.4.260.0000.00613.30
7.4.250.0070.00016.34
7.4.240.0050.00216.50
7.4.230.0040.00416.63
7.4.220.0050.00216.66
7.4.210.0080.01016.57
7.4.200.0000.00616.61
7.4.130.0060.01116.32
7.4.120.0070.01116.73
7.4.110.0150.00316.55
7.4.100.0180.00616.50
7.4.90.0100.00716.52
7.4.80.0100.00719.39
7.4.70.0100.01316.38
7.4.60.0040.01116.59
7.4.50.0090.00416.59
7.4.40.0120.00616.45
7.4.00.0000.01214.93
7.3.330.0030.00316.34
7.3.320.0030.00313.18
7.3.310.0030.00316.42
7.3.300.0030.00316.35
7.3.290.0070.00016.35
7.3.280.0090.00616.28
7.3.260.0120.00816.45
7.3.240.0090.00916.43
7.3.230.0120.00616.31
7.3.210.0110.00816.38
7.3.200.0110.00516.39
7.3.190.0090.00916.44
7.3.180.0130.00316.43
7.3.170.0090.00616.40
7.3.160.0060.01416.45
7.3.90.0120.00614.90
7.3.80.0090.00914.96
7.3.70.0070.01314.47
7.3.60.0060.01114.95
7.3.50.0080.00614.98
7.3.40.0090.00914.81
7.3.30.0060.00914.77
7.3.20.0120.00914.80
7.3.10.0130.00714.93
7.3.00.0150.00914.61
7.2.330.0120.00916.71
7.2.320.0120.01116.83
7.2.310.0130.00316.54
7.2.300.0070.01016.58
7.2.290.0060.01716.75
7.2.220.0190.00015.16
7.2.210.0030.01715.01
7.2.200.0110.01115.04
7.2.190.0100.01014.69
7.2.180.0030.01214.79
7.2.170.0080.01115.03
7.2.160.0120.00814.97
7.2.150.0120.00615.09
7.2.140.0060.01615.12
7.2.130.0100.01314.88
7.2.120.0110.01115.09
7.2.110.0030.01615.13
7.2.100.0110.00915.23
7.2.90.0070.01415.14
7.2.80.0090.01415.16
7.2.70.0170.00715.23
7.2.60.0080.01314.95
7.2.50.0040.01415.06
7.2.40.0070.01515.21
7.2.30.0090.01215.20
7.2.20.0110.01115.24
7.2.10.0040.01815.14
7.2.00.0140.00715.21
7.1.320.0090.00913.93
7.1.310.0070.01113.80
7.1.300.0100.00313.85
7.1.290.0170.02113.89
7.1.280.0100.00914.00
7.1.270.0140.00414.02
7.1.260.0120.00914.11
7.1.250.0070.01413.70

preferences:
172.62 ms | 403 KiB | 5 Q