3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = [ 'for-juniors' => 'product_category', 'for-men' => 'product_category', 'coats' => 'product_category', 'for-women' => 'product_category', '7-diamonds' => 'brand' ]; $grouped = []; foreach ($array as $grouped[$group][] => $group); var_export($grouped);

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.00817.32
8.4.130.0130.00718.63
8.4.120.0040.00624.05
8.4.110.0060.00418.84
8.4.100.0090.01317.80
8.4.90.0100.01022.32
8.4.80.0030.00517.47
8.4.70.0100.01017.59
8.4.60.0110.00820.84
8.4.50.0120.00819.48
8.4.40.0170.00319.21
8.4.30.0170.00318.66
8.4.20.0030.00517.73
8.4.10.0060.00322.08
8.3.270.0110.00916.55
8.3.260.0060.00316.79
8.3.250.0090.00919.03
8.3.240.0110.01017.16
8.3.230.0120.00716.78
8.3.220.0120.00617.18
8.3.210.0110.00918.66
8.3.200.0030.00616.62
8.3.190.0040.00417.15
8.3.180.0100.00916.59
8.3.170.0110.00717.01
8.3.160.0150.00316.80
8.3.150.0000.00817.36
8.3.140.0160.00316.46
8.3.130.0000.00818.40
8.3.120.0040.01220.54
8.3.110.0120.00320.94
8.3.100.0120.00316.51
8.3.90.0080.01226.77
8.3.80.0050.00516.50
8.3.70.0150.00318.56
8.3.60.0090.00916.75
8.3.50.0110.01119.88
8.3.40.0090.00618.64
8.3.30.0150.00319.08
8.3.20.0000.00724.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0110.00820.33
8.2.280.0110.00918.43
8.2.270.0130.00017.14
8.2.260.0090.00618.92
8.2.250.0040.00416.61
8.2.240.0050.00316.92
8.2.230.0000.00822.58
8.2.220.0090.00024.06
8.2.210.0070.00726.77
8.2.200.0090.00016.63
8.2.190.0110.00416.75
8.2.180.0140.00425.92
8.2.170.0170.00318.81
8.2.160.0100.00722.96
8.2.150.0070.00025.66
8.2.140.0040.00424.66
8.2.130.0070.00026.16
8.2.120.0080.00021.12
8.2.110.0000.00921.04
8.2.100.0040.00717.91
8.2.90.0040.00419.21
8.2.80.0110.00017.97
8.2.70.0030.00617.59
8.2.60.0000.00817.93
8.2.50.0000.00818.07
8.2.40.0070.00018.16
8.2.30.0040.00418.23
8.2.20.0050.00220.43
8.2.10.0000.00718.04
8.2.00.0040.00419.17
8.1.330.0070.00421.74
8.1.320.0110.01015.93
8.1.310.0050.00316.43
8.1.300.0060.00319.36
8.1.290.0060.00330.84
8.1.280.0070.01125.92
8.1.270.0040.00424.02
8.1.260.0030.00626.35
8.1.250.0040.00428.09
8.1.240.0130.00723.82
8.1.230.0110.00419.00
8.1.220.0000.00817.74
8.1.210.0000.00818.77
8.1.200.0090.00017.23
8.1.190.0000.00817.23
8.1.180.0040.00418.10
8.1.170.0000.00718.97
8.1.160.0000.00818.88
8.1.150.0020.00518.55
8.1.140.0000.00717.43
8.1.130.0030.00318.89
8.1.120.0080.00017.47
8.1.110.0000.00717.39
8.1.100.0000.00717.34
8.1.90.0000.00717.38
8.1.80.0030.00917.43
8.1.70.0000.00817.34
8.1.60.0040.00417.41
8.1.50.0030.00817.39
8.1.40.0160.00417.47
8.1.30.0070.01317.61
8.1.20.0030.01017.67
8.1.10.0100.00517.43
8.1.00.0150.00417.36
8.0.300.0030.00618.77
8.0.290.0000.00716.75
8.0.280.0070.00018.34
8.0.270.0050.00216.83
8.0.260.0000.00618.43
8.0.250.0030.00316.98
8.0.240.0040.00416.95
8.0.230.0030.00316.86
8.0.220.0030.00316.84
8.0.210.0030.00316.85
8.0.200.0070.00016.91
8.0.190.0040.00316.98
8.0.180.0080.00816.87
8.0.170.0110.00816.87
8.0.160.0100.00516.89
8.0.150.0170.00016.68
8.0.140.0140.00316.83
8.0.130.0160.00316.77
8.0.120.0130.00716.75
8.0.110.0190.00016.83
8.0.100.0210.00016.81
8.0.90.0140.00516.90
8.0.80.0150.00016.89
8.0.70.0090.00916.90
8.0.60.0140.00316.80
8.0.50.0090.00016.86
8.0.30.0110.00416.90
8.0.20.0150.00416.96
8.0.10.0040.00816.91
7.4.330.0000.00615.55
7.4.320.0070.00016.51
7.4.300.0060.00016.52
7.4.290.0070.00416.48
7.4.280.0140.00816.49
7.4.270.0180.00516.49
7.4.260.0200.00316.49
7.4.250.0190.00416.59
7.4.240.0120.00016.56
7.4.230.0050.01016.58
7.4.220.0110.00216.63
7.4.210.0040.00816.46
7.4.200.0140.00516.58
7.4.190.0090.00916.65
7.4.180.0140.00516.63
7.4.160.0140.00616.39
7.4.150.0150.00216.33
7.4.140.0090.00916.45
7.4.130.0090.00016.26
7.4.120.0030.00616.49
7.4.110.0060.00316.55
7.4.100.0090.00616.46
7.4.90.0070.00716.34
7.4.80.0050.00516.41
7.4.70.0090.00616.27
7.4.60.0180.00216.46
7.4.50.0160.00316.38
7.4.40.0120.00616.46
7.4.30.0140.00716.55
7.4.20.0140.00516.42
7.4.10.0080.00816.36
7.4.00.0070.00416.46

preferences:
32.13 ms | 403 KiB | 5 Q