3v4l.org

run code in 300+ PHP versions simultaneously
<?php $products = [1, 2, 3, 4, 5]; $vendors = ["Amazon", "Newegg", "Frys"]; $combinations = array(''); function pc_permute($items, $perms = array()) { if (empty($items)) { //echo join(' ', $perms) . "</br>"; //return $perms; array_push($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, $newperms); } } } pc_permute($products); var_dump($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.0110.00718.43
8.3.50.0050.01416.35
8.3.40.0100.00618.85
8.3.30.0110.00418.83
8.3.20.0040.00418.85
8.3.10.0080.00020.51
8.3.00.0060.00317.75
8.2.180.0160.00616.63
8.2.170.0000.01422.96
8.2.160.0030.01022.08
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0030.00519.70
8.2.110.0070.00319.36
8.2.100.0030.01117.84
8.2.90.0040.00417.75
8.2.80.0000.00818.78
8.2.70.0040.00417.50
8.2.60.0000.00817.63
8.2.50.0000.00817.55
8.2.40.0030.00619.35
8.2.30.0070.00018.02
8.2.20.0000.00717.75
8.2.10.0000.00717.82
8.2.00.0040.00517.85
8.1.280.0040.01125.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.01019.20
8.1.230.0070.00421.04
8.1.220.0050.00318.53
8.1.210.0040.00418.77
8.1.200.0080.00017.35
8.1.190.0000.00817.36
8.1.180.0030.00618.10
8.1.170.0000.00717.62
8.1.160.0040.00418.91
8.1.150.0000.00818.63
8.1.140.0040.00417.41
8.1.130.0050.00317.76
8.1.120.0040.00417.39
8.1.110.0040.00417.47
8.1.100.0040.00417.50
8.1.90.0030.00517.38
8.1.80.0000.00717.50
8.1.70.0000.00717.47
8.1.60.0000.00717.50
8.1.50.0060.00317.46
8.1.40.0080.00317.54
8.1.30.0000.00817.67
8.1.20.0000.00817.57
8.1.10.0000.00717.60
8.1.00.0040.00417.46
8.0.300.0040.00418.77
8.0.290.0080.00016.75
8.0.280.0000.00718.39
8.0.270.0000.00717.14
8.0.260.0000.00816.91
8.0.250.0070.00016.99
8.0.240.0000.01116.98
8.0.230.0070.00016.86
8.0.220.0000.00716.95
8.0.210.0030.00316.96
8.0.200.0000.00617.00
8.0.190.0050.00316.81
8.0.180.0000.00716.90
8.0.170.0000.00816.89
8.0.160.0030.00316.95
8.0.150.0020.00516.82
8.0.140.0050.00516.86
8.0.130.0080.00013.48
8.0.120.0040.00416.89
8.0.110.0000.00816.97
8.0.100.0070.00017.00
8.0.90.0050.00317.00
8.0.80.0090.00616.96
8.0.70.0000.00716.93
8.0.60.0000.00716.77
8.0.50.0000.00816.85
8.0.30.0060.01217.20
8.0.20.0070.01017.10
8.0.10.0040.00417.17
8.0.00.0090.00916.76
7.4.330.0050.00014.78
7.4.320.0030.00316.63
7.4.300.0000.00716.66
7.4.290.0070.00016.62
7.4.280.0090.00016.53
7.4.270.0000.00716.52
7.4.260.0000.00613.32
7.4.250.0000.00816.49
7.4.240.0000.00716.59
7.4.230.0000.00716.32
7.4.220.0090.01616.49
7.4.210.0070.01016.60
7.4.200.0020.00516.59
7.4.190.0040.00416.63
7.4.160.0150.00316.43
7.4.150.0110.00717.07
7.4.140.0070.01317.23
7.4.130.0140.00916.46
7.4.120.0150.00716.51
7.4.110.0110.00716.43
7.4.100.0160.00916.62
7.4.90.0100.01016.70
7.4.80.0030.01518.80
7.4.70.0110.00716.51
7.4.60.0150.01016.48
7.4.50.0000.00916.57
7.4.40.0090.00922.27
7.4.30.0170.00716.45
7.4.00.0060.01114.82
7.3.330.0030.00313.38
7.3.320.0000.00613.23
7.3.310.0000.00716.39
7.3.300.0000.00716.38
7.3.290.0030.01216.47
7.3.280.0080.01116.42
7.3.270.0090.00917.07
7.3.260.0150.00918.24
7.3.250.0130.00816.55
7.3.240.0140.00416.39
7.3.230.0140.00616.39
7.3.210.0030.01416.41
7.3.200.0040.01719.39
7.3.190.0120.00616.57
7.3.180.0100.00716.59
7.3.170.0130.00616.52
7.3.160.0130.01016.53
7.3.120.0070.00814.80
7.3.110.0100.00315.00
7.3.100.0080.00414.64
7.3.90.0000.01314.86
7.3.80.0120.00314.96
7.3.70.0030.00614.98
7.3.60.0060.00914.84
7.3.50.0110.00314.72
7.3.40.0100.00014.77
7.3.30.0030.01014.93
7.3.20.0110.00716.72
7.3.10.0030.01016.48
7.3.00.0000.01216.80
7.2.330.0160.00316.46
7.2.320.0070.01116.57
7.2.310.0060.01416.53
7.2.300.0120.01216.56
7.2.290.0120.00716.79
7.2.250.0100.01015.16
7.2.240.0060.01215.27
7.2.230.0080.00315.07
7.2.220.0070.01114.77
7.2.210.0030.00714.74
7.2.200.0080.00814.90
7.2.190.0100.00614.89
7.2.180.0070.01015.16
7.2.170.0100.00614.84
7.2.00.0060.01019.45
7.1.330.0000.01715.89
7.1.320.0060.00615.98
7.1.310.0030.01315.53
7.1.300.0060.00615.91
7.1.290.0060.00915.91
7.1.280.0070.00715.96
7.1.270.0040.01115.92
7.1.260.0000.01415.77
7.1.200.0040.00715.73
7.1.100.0000.01618.24
7.1.70.0000.00817.27
7.1.60.0100.01619.40
7.1.50.0040.01516.78
7.1.00.0030.06322.35
7.0.200.0040.00416.85
7.0.140.0070.07022.09
7.0.60.0100.04719.85
7.0.50.0100.07017.92
7.0.40.0070.08720.32
7.0.30.0400.07020.24
7.0.20.0370.07020.06
7.0.10.0430.08020.22
7.0.00.0070.05720.25
5.6.280.0100.07021.02
5.6.210.0130.07320.69
5.6.200.0030.06018.27
5.6.190.0100.09320.77
5.6.180.0230.04020.46
5.6.170.0200.05020.48
5.6.160.0030.08720.55
5.6.150.0130.03318.22
5.6.140.0100.06718.28
5.6.130.0070.08318.14
5.6.120.0100.05320.92
5.6.110.0000.07021.05
5.6.100.0270.05720.99
5.6.90.0100.08321.09
5.6.80.0070.03720.49
5.6.70.4370.03020.41
5.5.350.0230.06720.48
5.5.340.0070.06317.96
5.5.330.0070.05020.29
5.5.320.0230.03720.36
5.5.310.0200.04020.34
5.5.300.0130.07318.08
5.5.290.0070.08017.98
5.5.280.0170.04720.89
5.5.270.0130.07320.87
5.5.260.0130.08020.89
5.5.250.0130.03720.78
5.5.240.0130.07320.27
5.4.450.0000.04719.42
5.4.440.0000.04319.55
5.4.430.0100.06019.52
5.4.420.0030.04019.38
5.4.410.0130.04719.39
5.4.400.0000.05019.06
5.4.390.1330.04018.84
5.4.380.0070.03319.00
5.4.370.0030.03718.84
5.4.360.0030.03719.22
5.4.350.1500.03719.22
5.4.340.0070.05018.98
5.4.320.0000.04718.87
5.4.310.1430.03719.08
5.4.300.1570.04019.14
5.4.290.0070.03319.19
5.4.280.0070.03319.19
5.4.270.0100.03719.21
5.4.260.1600.02319.08
5.4.250.0000.08319.16
5.4.240.0030.03719.06
5.4.230.0130.07318.97
5.4.220.1470.03719.08
5.4.210.0070.03318.84
5.4.200.0130.03718.84
5.4.190.0100.03019.18
5.4.180.1530.04019.21
5.4.170.0070.03719.14
5.4.160.0030.03718.96
5.4.150.0030.04019.13
5.4.140.1430.04016.51
5.4.130.0030.03316.45
5.4.120.0070.03016.51
5.4.110.0000.03716.51
5.4.100.1470.03716.26
5.4.90.0000.03716.58
5.4.80.0070.04016.26
5.4.70.0700.04016.59
5.4.60.0070.03016.54
5.4.50.0000.03716.48
5.4.40.0000.04316.19
5.4.30.1500.03716.25
5.4.20.0030.03316.17
5.4.10.0070.04016.48
5.4.00.0030.03315.79
5.3.290.0100.03014.61
5.3.280.0100.03014.51
5.3.270.0100.03014.44
5.3.260.0070.03314.56
5.3.250.0130.06714.51
5.3.240.0030.05014.45
5.3.230.0830.04314.59
5.3.220.1930.06314.41
5.3.210.1830.04014.41
5.3.200.1730.04014.50
5.3.190.1630.03314.59
5.3.180.1770.03714.42
5.3.170.0070.03314.55
5.3.160.0070.06714.61
5.3.150.0770.06714.41
5.3.140.1670.02714.49
5.3.130.1900.04314.42
5.3.120.0000.05714.39
5.3.110.0030.08014.39
5.3.100.0000.05013.88
5.3.90.0030.04313.87
5.3.80.0070.04013.86
5.3.70.0170.05014.06
5.3.60.1670.03713.94
5.3.50.0000.03713.82
5.3.40.0030.04313.82
5.3.30.0070.06713.85
5.3.20.0030.04013.63
5.3.10.0000.04313.43
5.3.00.0030.04313.59
5.2.170.1370.02311.05
5.2.160.0000.03011.03
5.2.150.0000.04011.09
5.2.140.0000.03010.99
5.2.130.0830.03010.96
5.2.120.0030.03710.99
5.2.110.0030.05011.14
5.2.100.0170.04011.15
5.2.90.0000.03711.15
5.2.80.0030.06311.12
5.2.70.0030.05311.00
5.2.60.0570.04310.95
5.2.50.0030.03711.06
5.2.40.0030.03011.07
5.2.30.0000.03010.86
5.2.20.0000.03710.89
5.2.10.1070.03710.77
5.2.00.0000.03710.78
5.1.60.0070.0239.89
5.1.50.0100.04710.11
5.1.40.0000.0579.95
5.1.30.0030.04310.31
5.1.20.0030.02710.30
5.1.10.0030.02310.04
5.1.00.0100.03710.21
5.0.50.0200.0378.88
5.0.40.0000.0208.88
5.0.30.0030.0278.88
5.0.20.0070.0278.88
5.0.10.0000.0208.88
5.0.00.0000.0308.88
4.4.90.0000.0178.88
4.4.80.0030.0178.88
4.4.70.0030.0138.88
4.4.60.0000.0178.88
4.4.50.0030.0138.88
4.4.40.0000.0278.88
4.4.30.0000.0378.88
4.4.20.0070.0278.88
4.4.10.0030.0138.88
4.4.00.0000.0438.88
4.3.110.0100.0278.88
4.3.100.0070.0278.88
4.3.90.0000.0278.88
4.3.80.0030.0508.88
4.3.70.0030.0208.88
4.3.60.0000.0178.88
4.3.50.0030.0178.88
4.3.40.0070.0238.88
4.3.30.0170.0238.88
4.3.20.0000.0238.88
4.3.10.0030.0208.88
4.3.00.0030.0138.88

preferences:
99.64 ms | 401 KiB | 5 Q