3v4l.org

run code in 300+ PHP versions simultaneously
<?php $products = [1, 2, 3, 4, 5]; $vendors = ["Amazon", "Newegg", "##php"]; $vendorProducts = []; foreach ($vendors as $vendor) { $vendorProducts[$vendor] = []; foreach ($products as $productID) { $vendorProducts[$vendor][] = $productID; } } var_dump($vendorProducts);

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.3.40.0070.00718.66
8.3.30.0100.00320.13
8.3.20.0040.00420.25
8.3.10.0040.00422.04
8.3.00.0000.00722.57
8.2.170.0100.01022.96
8.2.160.0140.00022.25
8.2.150.0080.00024.18
8.2.140.0080.00024.66
8.2.130.0040.01126.16
8.2.120.0040.00421.11
8.2.110.0050.00522.23
8.2.100.0070.00417.78
8.2.90.0040.00419.34
8.2.80.0040.00419.38
8.2.70.0050.00317.49
8.2.60.0080.00018.03
8.2.50.0050.00318.07
8.2.40.0080.00018.18
8.2.30.0050.00218.13
8.2.20.0040.00417.66
8.2.10.0040.00417.66
8.2.00.0000.00817.67
8.1.270.0080.00023.99
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0050.00523.95
8.1.230.0040.00719.21
8.1.220.0000.00817.79
8.1.210.0040.00418.77
8.1.200.0080.00017.23
8.1.190.0050.00317.66
8.1.180.0060.00319.01
8.1.170.0000.00818.55
8.1.160.0000.00918.97
8.1.150.0080.00018.70
8.1.140.0000.00717.37
8.1.130.0000.00717.88
8.1.120.0030.00417.45
8.1.110.0030.00317.44
8.1.100.0000.00717.39
8.1.90.0030.00517.36
8.1.80.0040.00417.46
8.1.70.0000.00717.45
8.1.60.0000.00817.51
8.1.50.0040.00417.43
8.1.40.0060.00317.52
8.1.30.0040.00417.64
8.1.20.0000.00817.65
8.1.10.0080.00017.52
8.1.00.0040.00417.50
8.0.300.0000.00718.77
8.0.290.0040.00417.18
8.0.280.0070.00018.45
8.0.270.0000.00717.13
8.0.260.0030.00316.82
8.0.250.0030.00316.96
8.0.240.0060.00316.96
8.0.230.0050.00316.95
8.0.220.0040.00416.88
8.0.210.0030.00316.89
8.0.200.0030.00316.86
8.0.190.0040.00417.00
8.0.180.0070.00016.82
8.0.170.0040.00316.83
8.0.160.0040.00416.71
8.0.150.0040.00416.76
8.0.140.0080.00016.79
8.0.130.0030.00613.36
8.0.120.0070.00316.82
8.0.110.0040.00416.94
8.0.100.0040.00416.95
8.0.90.0000.00816.86
8.0.80.0100.01016.95
8.0.70.0070.00016.95
8.0.60.0040.00416.78
8.0.50.0000.00816.90
8.0.30.0110.00816.79
8.0.20.0090.01617.40
8.0.10.0040.00416.92
8.0.00.0150.00316.78
7.4.330.0030.00315.00
7.4.320.0000.00616.45
7.4.300.0050.00216.59
7.4.290.0040.00416.53
7.4.280.0000.00716.62
7.4.270.0030.00316.41
7.4.260.0030.00313.39
7.4.250.0000.00716.49
7.4.240.0050.00216.52
7.4.230.0040.00416.61
7.4.220.0110.01116.55
7.4.210.0070.01016.59
7.4.200.0000.00716.33
7.4.190.0040.00416.55
7.4.160.0160.00016.50
7.4.150.0060.01317.40
7.4.140.0190.00917.86
7.4.130.0050.01216.37
7.4.120.0110.00616.53
7.4.110.0130.00416.39
7.4.100.0100.00616.59
7.4.90.0140.00916.50
7.4.80.0140.00719.39
7.4.70.0100.01316.46
7.4.60.0070.01016.28
7.4.50.0030.00616.55
7.4.40.0070.00722.77
7.4.30.0060.01216.42
7.4.00.0000.01415.04
7.3.330.0050.00013.08
7.3.320.0050.00013.20
7.3.310.0070.00016.25
7.3.300.0040.00416.17
7.3.290.0070.00716.44
7.3.280.0090.00716.36
7.3.270.0090.00917.40
7.3.260.0180.00616.42
7.3.250.0070.01216.42
7.3.240.0060.01116.62
7.3.230.0110.00816.39
7.3.210.0080.01116.29
7.3.200.0170.00019.39
7.3.190.0100.00716.25
7.3.180.0090.01216.27
7.3.170.0060.01716.36
7.3.160.0110.00516.53
7.3.120.0070.00714.80
7.2.330.0140.00416.58
7.2.320.0110.00616.71
7.2.310.0030.01316.77
7.2.300.0060.01116.65
7.2.290.0060.01616.81
7.2.60.0000.00816.57
7.2.00.0090.00319.46
7.1.200.0000.01415.62
7.1.100.0040.01118.29
7.1.70.0070.00317.27
7.1.60.0140.01119.32
7.1.50.0100.01017.00
7.1.00.0000.03722.57
7.0.200.0020.00516.79
7.0.140.0000.08022.15
7.0.70.0570.04019.85
7.0.60.0570.03719.97
7.0.50.0300.04320.38
7.0.40.0000.05720.11
7.0.30.0070.09020.07
7.0.20.0070.05720.14
7.0.10.0100.04320.18
7.0.00.0000.05720.14
5.6.280.0030.07320.98
5.6.220.0000.04320.57
5.6.210.0030.04320.64
5.6.200.0070.04721.17
5.6.190.0070.06721.14
5.6.180.0130.07320.93
5.6.170.0130.07721.08
5.6.160.0100.07721.00
5.6.150.0200.07321.00
5.6.140.0030.05321.04
5.6.130.0000.09720.94
5.6.120.0030.07021.02
5.6.110.0030.07321.01
5.6.100.0070.08720.94
5.6.90.0100.08020.98
5.6.80.0100.07320.43
5.6.70.0170.07320.54
5.6.60.0100.08320.27
5.6.50.0030.08720.38
5.6.40.0130.06720.38
5.6.30.0070.06720.39
5.6.20.0070.08320.43
5.6.10.0130.08020.37
5.6.00.0070.06720.38
5.5.360.0100.03720.31
5.5.350.0030.04720.44
5.5.340.0070.03720.88
5.5.330.0030.04720.91
5.5.320.0030.04320.88
5.5.310.0070.09020.75
5.5.300.0170.06020.76
5.5.290.0070.05020.61
5.5.280.0100.08720.88
5.5.270.0070.05320.81
5.5.260.0130.07320.74
5.5.250.0130.08320.73
5.5.240.0030.04320.14
5.5.230.0070.08720.18
5.5.220.0100.08020.29
5.5.210.0130.08320.11
5.5.200.0170.07720.23
5.5.190.0070.08020.22
5.5.180.0030.05720.27
5.5.160.0200.07020.22
5.5.150.0170.07320.18
5.5.140.0070.05720.23
5.5.130.0070.07720.16
5.5.120.0130.08320.26
5.5.110.0130.05320.22
5.5.100.0130.07719.92
5.5.90.0070.06320.16
5.5.80.0030.08320.07
5.5.70.0030.07020.16
5.5.60.0070.08020.05
5.5.50.0070.06020.02
5.5.40.0130.03020.10
5.5.30.0100.06320.02
5.5.20.0030.05020.14
5.5.10.0070.08720.03
5.5.00.0170.06319.99
5.4.450.0130.07719.55
5.4.440.0070.06719.42
5.4.430.0100.06019.42
5.4.420.0130.07719.35
5.4.410.0100.07019.00
5.4.400.0130.04719.09
5.4.390.0170.07018.90
5.4.380.0030.08719.12
5.4.370.0070.07718.91
5.4.360.0070.07319.03
5.4.350.0000.08019.04
5.4.340.0070.07319.25
5.4.320.0070.07319.20
5.4.310.0070.05019.05
5.4.300.0030.06019.14
5.4.290.0070.06018.81
5.4.280.0130.04319.05
5.4.270.0130.07319.05
5.4.260.0030.08018.83
5.4.250.0070.07019.00
5.4.240.0030.08019.05
5.4.230.0170.06318.88
5.4.220.0070.08319.02
5.4.210.0030.08718.94
5.4.200.0030.08319.05
5.4.190.0100.07719.03
5.4.180.0070.06019.02
5.4.170.0030.08718.80
5.4.160.0100.07318.92
5.4.150.0130.07718.98
5.4.140.0030.04316.29
5.4.130.0100.05016.27
5.4.120.0070.07716.27
5.4.110.0070.07016.38
5.4.100.0000.05716.21
5.4.90.0030.04716.26
5.4.80.0000.04716.19
5.4.70.0030.08016.32
5.4.60.0100.07316.29
5.4.50.0200.06016.33
5.4.40.0070.04016.23
5.4.30.0100.06316.35
5.4.20.0030.07316.18
5.4.10.0070.05716.38
5.4.00.0030.08015.80
5.3.290.0100.08014.60
5.3.280.0000.07714.55
5.3.270.0000.08714.44
5.3.260.0070.08714.55
5.3.250.0070.07714.61
5.3.240.0070.07014.46
5.3.230.0130.06714.46
5.3.220.0200.06014.43
5.3.210.0030.07714.43
5.3.200.0100.07314.53
5.3.190.0070.07714.55
5.3.180.0030.05714.55
5.3.170.0000.06714.42
5.3.160.0130.06714.56
5.3.150.0070.07014.50
5.3.140.0030.08314.42
5.3.130.0030.07314.50
5.3.120.0000.06314.54
5.3.110.0070.08014.38
5.3.100.0100.07313.90
5.3.90.0100.03013.98
5.3.80.0030.07713.97
5.3.70.0170.07013.98
5.3.60.0130.06014.00
5.3.50.0030.05713.81
5.3.40.0130.05013.95
5.3.30.0030.06313.77
5.3.20.0030.05713.46
5.3.10.0070.06313.40
5.3.00.0030.07713.49
5.2.170.0030.05712.21
5.2.160.0100.05312.21
5.2.150.0030.06312.21
5.2.140.0070.03312.21
5.2.130.0030.06012.21
5.2.120.0030.06712.21
5.2.110.0030.04312.21
5.2.100.0000.06012.21
5.2.90.0000.06712.21
5.2.80.0170.05312.21
5.2.70.0070.05012.21
5.2.60.0000.03712.21
5.2.50.0070.04712.21
5.2.40.0030.06312.21
5.2.30.0030.06012.21
5.2.20.0000.04712.21
5.2.10.0000.07012.21
5.2.00.0030.02712.21
5.1.60.0070.05012.21
5.1.50.0000.04312.21
5.1.40.0070.04312.21
5.1.30.0100.03312.21
5.1.20.0070.05712.21
5.1.10.0000.06012.21
5.1.00.0030.05712.21
5.0.50.0030.04312.21
5.0.40.0030.02012.21
5.0.30.0070.05712.21
5.0.20.0030.04712.21
5.0.10.0070.04012.21
5.0.00.0030.05012.21
4.4.90.0030.01312.21
4.4.80.0030.03312.21
4.4.70.0030.03012.21
4.4.60.0000.04012.21
4.4.50.0070.03312.21
4.4.40.0070.04312.21
4.4.30.0000.03012.21
4.4.20.0000.03312.21
4.4.10.0070.02312.21
4.4.00.0030.03312.21
4.3.110.0030.03312.21
4.3.100.0000.03712.21
4.3.90.0030.03012.21
4.3.80.0000.03312.21
4.3.70.0070.03312.21
4.3.60.0070.03012.21
4.3.50.0030.03312.21
4.3.40.0000.05712.21
4.3.30.0000.03712.21
4.3.20.0000.04012.21
4.3.10.0000.02712.21
4.3.00.0000.02712.21

preferences:
41.7 ms | 400 KiB | 5 Q