3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = [[ "continent" => "Europa", "country" => "France", "capital" => "Paris", ],[ "continent" => "Europa", "country" => "Spain", "capital" => "Madrid", ],[ "continent" => "Asia", "country" => "Russia", "capital" => "Moscow", ]]; $groupByProperty = function(array $list, string $property) { return array_reduce($list, function($grouped, $item) use(&$property) { $grouped[$item[$property]][] = $item; return $grouped; }, []); }; $groupedByContinent = $groupByProperty($data, 'continent'); var_dump($groupedByContinent);

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.20.0060.01318.88
8.4.10.0130.00717.89
8.3.150.0150.00018.37
8.3.140.0040.00416.62
8.3.130.0080.00016.43
8.3.120.0060.01318.90
8.3.110.0120.00620.94
8.3.100.0040.01524.06
8.3.90.0040.00426.77
8.3.80.0030.00616.75
8.3.70.0120.00316.75
8.3.60.0040.01218.55
8.3.50.0080.00819.05
8.3.40.0130.01018.66
8.3.30.0080.00618.84
8.3.20.0040.00420.99
8.3.10.0080.00023.66
8.3.00.0000.00822.45
8.2.270.0070.01117.36
8.2.260.0000.01116.45
8.2.250.0170.00016.18
8.2.240.0060.00318.74
8.2.230.0090.00022.58
8.2.220.0060.00337.54
8.2.210.0150.00326.77
8.2.200.0030.00716.63
8.2.190.0090.00616.63
8.2.180.0090.00925.92
8.2.170.0040.01119.04
8.2.160.0090.00622.96
8.2.150.0040.00424.18
8.2.140.0060.00324.66
8.2.130.0060.00318.03
8.2.120.0030.00526.35
8.2.110.0080.00421.00
8.2.100.0090.00317.72
8.2.90.0040.00419.17
8.2.80.0040.00417.97
8.2.70.0030.00617.63
8.2.60.0060.00317.80
8.2.50.0050.00318.07
8.2.40.0080.00017.92
8.2.30.0030.00618.23
8.2.20.0040.00418.06
8.2.10.0000.00921.14
8.2.00.0000.00718.15
8.1.310.0070.00018.07
8.1.300.0120.00617.49
8.1.290.0050.00518.88
8.1.280.0070.01425.92
8.1.270.0060.00323.83
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00321.37
8.1.230.0070.00417.95
8.1.220.0030.00917.74
8.1.210.0040.00418.77
8.1.200.0050.00517.35
8.1.190.0050.00317.35
8.1.180.0000.00818.10
8.1.170.0040.00418.64
8.1.160.0000.00818.94
8.1.150.0070.00018.89
8.1.140.0040.00418.96
8.1.130.0070.00020.13
8.1.120.0000.00717.36
8.1.110.0000.00717.45
8.1.100.0030.00517.44
8.1.90.0070.00017.39
8.1.80.0000.00717.46
8.1.70.0000.00717.38
8.1.60.0030.00517.59
8.1.50.0000.00817.52
8.1.40.0000.00817.40
8.1.30.0080.00017.52
8.1.20.0040.00417.66
8.1.10.0000.00717.57
8.1.00.0050.00317.37
8.0.300.0030.00718.77
8.0.290.0040.00416.75
8.0.280.0050.00318.38
8.0.270.0030.00317.25
8.0.260.0040.00418.45
8.0.250.0030.00316.96
8.0.240.0000.00716.97
8.0.230.0030.00516.98
8.0.220.0030.00316.89
8.0.210.0000.00716.72
8.0.200.0050.00316.95
8.0.190.0000.00816.84
8.0.180.0000.00816.85
8.0.170.0060.00316.88
8.0.160.0000.00716.94
8.0.150.0000.00716.92
8.0.140.0040.00416.86
8.0.130.0030.00313.31
8.0.120.0040.00416.76
8.0.110.0000.00816.89
8.0.100.0040.00416.95
8.0.90.0000.00716.89
8.0.80.0120.00316.91
8.0.70.0040.00416.83
8.0.60.0000.00716.75
8.0.50.0000.00716.76
8.0.30.0130.00617.02
8.0.20.0080.01217.33
8.0.10.0040.00416.86
8.0.00.0110.00916.74
7.4.330.0000.00516.83
7.4.320.0030.00316.60
7.4.300.0030.00316.40
7.4.290.0020.00516.58
7.4.280.0050.00316.57
7.4.270.0030.00316.52
7.4.260.0000.00816.49
7.4.250.0040.00416.46
7.4.240.0000.00716.46
7.4.230.0040.00416.54
7.4.220.0070.00016.55
7.4.210.0020.01616.56
7.4.200.0030.00316.40
7.4.160.0050.01216.42
7.4.130.0000.01616.55
7.4.120.0070.01016.39
7.4.110.0100.00716.48
7.4.100.0030.02016.54
7.4.90.0130.01016.54
7.4.80.0040.01319.39
7.4.70.0130.00916.57
7.4.60.0120.00316.51
7.4.50.0090.00616.43
7.4.40.0070.01016.39
7.4.10.0090.00814.81
7.4.00.0080.01014.86
7.3.330.0030.00213.33
7.3.320.0060.00013.43
7.3.310.0070.00016.41
7.3.300.0000.00716.23
7.3.290.0000.00716.40
7.3.280.0150.00916.31
7.3.260.0120.00716.48
7.3.240.0100.00716.46
7.3.230.0060.01316.52
7.3.210.0100.00716.52
7.3.200.0210.00016.20
7.3.190.0040.01616.43
7.3.180.0190.00016.28
7.3.170.0030.01816.38
7.3.160.0160.00616.29
7.3.130.0060.01114.85
7.3.120.0080.00814.80
7.3.110.0080.00914.81
7.3.100.0060.01114.86
7.3.90.0060.00714.77
7.3.80.0080.00414.91
7.3.70.0070.00614.77
7.3.60.0040.00914.79
7.3.50.0070.00614.80
7.3.40.0040.01014.81
7.3.30.0060.00914.76
7.3.20.0080.00716.23
7.3.10.0090.00516.18
7.3.00.0070.00616.36
7.2.330.0140.00816.52
7.2.320.0100.00716.72
7.2.310.0040.01216.55
7.2.300.0030.01316.34
7.2.290.0110.01416.56
7.2.260.0060.01215.23
7.2.250.0090.00714.80
7.2.240.0070.00914.96
7.2.230.0050.01014.86
7.2.220.0090.00615.14
7.2.210.0060.00815.08
7.2.200.0050.00814.96
7.2.190.0050.01015.04
7.2.180.0070.00715.11
7.2.170.0050.00814.92
7.2.160.0040.01014.91
7.2.150.0090.00616.47
7.2.140.0030.01016.56
7.2.130.0080.00816.46
7.2.120.0070.00916.45
7.2.110.0080.00516.39
7.2.100.0290.00716.43
7.2.90.0070.00816.48
7.2.80.0040.01016.55
7.2.70.0080.00616.48
7.2.60.0060.01116.48
7.2.50.0090.00616.38
7.2.40.0080.00516.43
7.2.30.0090.00516.54
7.2.20.0060.00916.57
7.2.10.0050.00616.43
7.2.00.0050.00916.51
7.1.330.0040.00815.77
7.1.320.0080.00715.71
7.1.310.0080.00515.88
7.1.300.0050.00715.72
7.1.290.0060.00515.71
7.1.280.0040.01115.40
7.1.270.0090.00615.49
7.1.260.0070.00515.42
7.1.250.0080.00615.35
7.1.240.0050.00815.80
7.1.230.0050.00815.89
7.1.220.0040.00715.78
7.1.210.0060.00715.87
7.1.200.0040.00615.85
7.1.190.0040.00715.79
7.1.180.0030.01115.74
7.1.170.0060.00615.77
7.1.160.0070.00615.90
7.1.150.0030.01015.87
7.1.140.0060.00615.67
7.1.130.0070.00415.80
7.1.120.0020.00915.88
7.1.110.0050.00715.86
7.1.100.0090.00615.60
7.1.90.0080.00615.72
7.1.80.0060.00715.78
7.1.70.0030.01115.66
7.1.60.0050.00915.81
7.1.50.0040.00715.80
7.1.40.0080.00415.78
7.1.30.0080.00715.82
7.1.20.0050.00815.74
7.1.10.0070.00715.81
7.1.00.0060.00715.74

preferences:
29 ms | 403 KiB | 5 Q