3v4l.org

run code in 300+ PHP versions simultaneously
<?php $products = [1, 2, 3, 4, 5]; $vendors = ["Amazon", "Newegg", "Frys"]; $product_combinations = array(); $vendor_combinations = array(); function pc_permute($items, &$combinations, $perms = array()) { if (empty($items)) { $combinations[] = $perms; } else { for ($i = count($items) - 1; $i >= 0; --$i) { $newitems = $items; $newperms = $perms; list($foo) = array_splice($newitems, $i, 1); array_unshift($newperms, $foo); pc_permute($newitems, $combinations, $newperms); } } } // Build product combinations //pc_permute($products, $product_combinations); // Build vendor combinations pc_permute($vendors, $vendor_combinations); var_dump($vendor_combinations);

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.60.0100.01018.17
8.3.50.0120.00922.05
8.3.40.0140.00718.79
8.3.30.0110.00320.21
8.3.20.0080.00020.36
8.3.10.0040.00422.05
8.3.00.0080.00022.49
8.2.180.0060.00917.91
8.2.170.0150.00022.96
8.2.160.0070.00722.13
8.2.150.0070.00024.18
8.2.140.0000.00824.66
8.2.130.0100.00726.16
8.2.120.0000.00820.92
8.2.110.0070.00322.08
8.2.100.0060.00617.91
8.2.90.0050.00319.18
8.2.80.0050.00319.07
8.2.70.0040.00417.37
8.2.60.0080.00018.04
8.2.50.0080.00018.07
8.2.40.0000.00818.14
8.2.30.0030.00518.00
8.2.20.0030.00517.80
8.2.10.0040.00417.74
8.2.00.0060.00317.62
8.1.280.0090.00625.92
8.1.270.0040.00423.99
8.1.260.0050.00326.35
8.1.250.0050.00328.09
8.1.240.0060.00322.54
8.1.230.0080.00320.97
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0030.00617.35
8.1.190.0060.00317.43
8.1.180.0100.00018.10
8.1.170.0040.00418.50
8.1.160.0050.00218.80
8.1.150.0000.00818.64
8.1.140.0040.00417.40
8.1.130.0050.00217.82
8.1.120.0000.00817.45
8.1.110.0080.00017.43
8.1.100.0080.00017.40
8.1.90.0050.00317.46
8.1.80.0000.00717.48
8.1.70.0040.00417.31
8.1.60.0030.00517.45
8.1.50.0040.00417.55
8.1.40.0090.00017.41
8.1.30.0000.00817.64
8.1.20.0060.00317.58
8.1.10.0000.00817.46
8.1.00.0080.00017.39
8.0.300.0040.00418.77
8.0.290.0040.00417.05
8.0.280.0000.00718.26
8.0.270.0050.00317.07
8.0.260.0060.00018.30
8.0.250.0070.00016.89
8.0.240.0050.00316.93
8.0.230.0050.00216.91
8.0.220.0040.00416.84
8.0.210.0050.00316.82
8.0.200.0060.00316.83
8.0.190.0060.00316.91
8.0.180.0020.00516.74
8.0.170.0040.00416.93
8.0.160.0000.00716.89
8.0.150.0040.00416.73
8.0.140.0080.00016.79
8.0.130.0000.00713.29
8.0.120.0000.00716.79
8.0.110.0000.00716.84
8.0.100.0030.00616.76
8.0.90.0040.00416.72
8.0.80.0130.00616.78
8.0.70.0000.00716.85
8.0.60.0050.00216.79
8.0.50.0030.00516.89
8.0.30.0100.00916.85
8.0.20.0110.01017.40
8.0.10.0070.00017.08
8.0.00.0110.00916.73
7.4.330.0030.00315.00
7.4.320.0030.00316.53
7.4.300.0000.00616.49
7.4.290.0040.00416.51
7.4.280.0040.00416.48
7.4.270.0030.00316.61
7.4.260.0070.00013.39
7.4.250.0040.00416.48
7.4.240.0040.00316.55
7.4.230.0000.00716.70
7.4.220.0130.00716.56
7.4.210.0090.00716.59
7.4.200.0040.00416.26
7.4.190.0040.00416.43
7.4.160.0170.00716.35
7.4.150.0060.01317.40
7.4.140.0150.00917.86
7.4.130.0050.01116.51
7.4.120.0100.00816.46
7.4.110.0140.00416.36
7.4.100.0130.01216.36
7.4.90.0160.01416.35
7.4.80.0150.00319.39
7.4.70.0160.00716.60
7.4.60.0130.00316.49
7.4.50.0050.00316.46
7.4.40.0030.01022.77
7.4.30.0060.01616.36
7.4.00.0030.01014.96
7.3.330.0030.00313.32
7.3.320.0000.00513.30
7.3.310.0000.00716.36
7.3.300.0050.00216.37
7.3.290.0060.01016.34
7.3.280.0090.00916.35
7.3.270.0160.00717.40
7.3.260.0100.00716.29
7.3.250.0060.01316.46
7.3.240.0100.00716.34
7.3.230.0090.00916.42
7.3.210.0110.00716.48
7.3.200.0070.01019.39
7.3.190.0180.00416.55
7.3.180.0070.01016.38
7.3.170.0030.01916.38
7.3.160.0120.00616.33
7.3.120.0070.00414.93
7.2.330.0150.00616.79
7.2.320.0150.01216.75
7.2.310.0170.00316.73
7.2.300.0070.01116.75
7.2.290.0160.00616.64
7.2.60.0060.00617.02
7.2.50.0030.01316.87
7.1.200.0030.01015.89
7.1.70.0030.01017.38
7.1.60.0080.01119.32
7.1.50.0070.01317.08
7.1.00.0070.07322.43
7.0.200.0000.00816.52
7.0.140.0000.07722.09
7.0.100.0100.08019.95
7.0.90.0030.07319.88
7.0.80.0030.08719.93
7.0.70.0330.07320.00
7.0.60.0070.08719.79
7.0.50.0170.06020.32
7.0.40.0070.07720.05
7.0.30.0030.06020.13
7.0.20.0170.07020.09
7.0.10.0130.07020.11
7.0.00.0130.07720.10
5.6.280.0100.06720.91
5.6.250.0100.08720.66
5.6.240.0030.09020.76
5.6.230.0230.03020.60
5.6.220.0030.07320.58
5.6.210.0130.08020.68
5.6.200.0200.08321.11
5.6.190.0030.07721.09
5.6.180.0130.07720.94
5.6.170.0030.05321.14
5.6.160.0100.06721.04
5.6.150.0100.04721.05
5.6.140.0000.04720.93
5.6.130.0100.07320.95
5.6.120.0200.03321.17
5.6.110.0100.08021.11
5.6.100.0030.08721.02
5.6.90.0070.08721.09
5.6.80.0130.06720.48
5.6.70.0170.06320.48
5.6.60.0030.07720.31
5.6.50.0100.07720.48
5.6.40.0070.07720.46
5.6.30.0000.04720.46
5.6.20.0100.05020.37
5.6.10.0100.03720.43
5.6.00.0070.04020.48
5.5.380.0070.08720.46
5.5.370.0030.04720.50
5.5.360.0070.07320.39
5.5.350.0070.07720.34
5.5.340.0070.05720.88
5.5.330.0030.08020.85
5.5.320.0030.06020.89
5.5.310.0100.08020.88
5.5.300.0100.06720.89
5.5.290.0100.07720.77
5.5.280.0070.08020.91
5.5.270.0000.08720.80
5.5.260.0100.07720.87
5.5.250.0130.07020.46
5.5.240.0130.06720.02
5.5.230.0100.07720.26
5.5.220.0130.08720.30
5.5.210.0070.05020.30
5.5.200.0070.04020.25
5.5.190.0100.07720.23
5.5.180.0130.05720.23
5.5.160.0000.04720.25
5.5.150.0070.03720.13
5.5.140.0030.04020.24
5.5.130.0130.03020.18
5.5.120.0030.03320.00
5.5.110.0030.04019.98
5.5.100.0100.03720.11
5.5.90.0000.04020.13
5.5.80.0000.04020.10
5.5.70.0000.04720.07
5.5.60.0000.03720.15
5.5.50.0030.03319.97
5.5.40.0070.03720.16
5.5.30.0070.04020.05
5.5.20.0030.04020.06
5.5.10.0000.04320.07
5.5.00.0030.04319.96
5.4.450.0100.07319.48
5.4.440.0030.04719.46
5.4.430.0030.04319.52
5.4.420.0030.03719.42
5.4.410.0100.06019.32
5.4.400.0100.07319.21
5.4.390.0100.06319.06
5.4.380.0100.07318.88
5.4.370.0030.06719.18
5.4.360.0030.04719.21
5.4.350.0100.03019.05
5.4.340.0070.07719.03
5.4.320.0030.04018.88
5.4.310.0000.04018.95
5.4.300.0030.04318.95
5.4.290.0100.03319.04
5.4.280.0030.03718.94
5.4.270.0030.04018.87
5.4.260.0030.03719.12
5.4.250.0030.03318.84
5.4.240.0000.04719.22
5.4.230.0070.03018.87
5.4.220.0000.05019.13
5.4.210.0030.04019.13
5.4.200.0000.04019.15
5.4.190.0030.04019.08
5.4.180.0100.04019.20
5.4.170.0030.04019.03
5.4.160.0070.04019.07
5.4.150.0030.03719.03
5.4.140.0030.04016.42
5.4.130.0070.03316.32
5.4.120.0100.03716.46
5.4.110.0100.03016.27
5.4.100.0030.03716.47
5.4.90.0070.03016.45
5.4.80.0030.05016.45
5.4.70.0030.03716.32
5.4.60.0000.04016.29
5.4.50.0000.04716.40
5.4.40.0070.03316.39
5.4.30.0070.04016.48
5.4.20.0030.03716.46
5.4.10.0070.03316.29
5.4.00.0030.03315.78
5.3.290.0130.02714.63
5.3.280.0000.04014.57
5.3.270.0000.04714.60
5.3.260.0030.03714.59
5.3.250.0030.03714.62
5.3.240.0070.03714.46
5.3.230.0030.03714.59
5.3.220.0000.04014.54
5.3.210.0000.04014.55
5.3.200.0030.03714.43
5.3.190.0030.03014.53
5.3.180.0030.03714.57
5.3.170.0070.03314.55
5.3.160.0100.03314.52
5.3.150.0070.03014.44
5.3.140.0030.04014.42
5.3.130.0000.04014.37
5.3.120.0030.04714.51
5.3.110.0000.04014.54
5.3.100.0070.03314.02
5.3.90.0130.02713.97
5.3.80.0000.04014.00
5.3.70.0100.02714.02
5.3.60.0030.03313.86
5.3.50.0030.03313.86
5.3.40.0030.04013.93
5.3.30.0100.03013.81
5.3.20.0000.03713.67
5.3.10.0030.04313.62
5.3.00.0070.07013.41
5.2.170.0030.03311.12
5.2.160.0030.03011.13
5.2.150.0000.03011.21
5.2.140.0030.05011.00
5.2.130.0000.03010.93
5.2.120.0000.03010.95
5.2.110.0030.02711.14
5.2.100.0070.05710.94
5.2.90.0100.05311.12
5.2.80.0070.04711.02
5.2.70.0030.03310.91
5.2.60.0070.03711.04
5.2.50.0070.04711.04
5.2.40.0070.05311.04
5.2.30.0030.03010.93
5.2.20.0000.04010.81
5.2.10.0070.05010.88
5.2.00.0000.05710.73
5.1.60.0000.05310.06
5.1.50.0000.06010.00
5.1.40.0130.04310.00
5.1.30.0000.05710.37
5.1.20.0070.03010.41
5.1.10.0030.03010.00
5.1.00.0070.05010.05
5.0.50.0030.04310.00
5.0.40.0000.04710.00
5.0.30.0070.06310.00
5.0.20.0070.04010.00
5.0.10.0030.03710.00
5.0.00.0030.06310.00
4.4.90.0070.03010.00
4.4.80.0030.03310.00
4.4.70.0000.03710.00
4.4.60.0000.03310.00
4.4.50.0000.03710.00
4.4.40.0000.03010.00
4.4.30.0070.03310.00
4.4.20.0070.02710.00
4.4.10.0000.03710.00
4.4.00.0030.05310.00
4.3.110.0000.02710.00
4.3.100.0000.02010.00
4.3.90.0030.03710.00
4.3.80.0070.03710.00
4.3.70.0000.02710.00
4.3.60.0030.01710.00
4.3.50.0000.02310.00
4.3.40.0030.05010.00
4.3.30.0000.03710.00
4.3.20.0000.04010.00
4.3.10.0000.03710.00
4.3.00.0070.03010.00

preferences:
47.93 ms | 401 KiB | 5 Q