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()) { global $combinations; if (empty($items)) { //echo join(' ', $perms); //var_dump($perms); $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.70.0070.01116.58
8.3.60.0090.00918.30
8.3.50.0130.00821.14
8.3.40.0070.01318.84
8.3.30.0030.01720.34
8.3.20.0060.00320.35
8.3.10.0090.00022.27
8.3.00.0040.00722.57
8.2.180.0110.01516.88
8.2.170.0250.00022.96
8.2.160.0110.00722.12
8.2.150.0060.00324.18
8.2.140.0070.00324.66
8.2.130.0100.00026.16
8.2.120.0030.00721.18
8.2.110.0080.00522.24
8.2.100.0070.00717.84
8.2.90.0070.00719.18
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0030.00617.91
8.2.50.0040.00718.07
8.2.40.0060.00318.16
8.2.30.0000.00818.15
8.2.20.0040.00417.80
8.2.10.0090.00017.76
8.2.00.0060.00617.77
8.1.280.0150.00325.92
8.1.270.0090.00023.99
8.1.260.0070.00326.35
8.1.250.0060.00328.09
8.1.240.0090.00324.00
8.1.230.0100.00317.58
8.1.220.0070.00317.76
8.1.210.0030.00618.77
8.1.200.0000.01017.35
8.1.190.0080.00317.23
8.1.180.0070.00418.10
8.1.170.0000.00918.47
8.1.160.0060.00318.85
8.1.150.0060.00318.73
8.1.140.0090.00017.41
8.1.130.0080.00017.87
8.1.120.0030.00617.50
8.1.110.0000.00917.53
8.1.100.0080.00017.47
8.1.90.0030.00517.55
8.1.80.0060.00317.39
8.1.70.0040.00417.36
8.1.60.0070.00317.59
8.1.50.0000.00917.57
8.1.40.0090.00017.46
8.1.30.0030.00617.67
8.1.20.0000.01017.74
8.1.10.0030.00717.64
8.1.00.0030.00617.59
8.0.300.0030.00618.77
8.0.290.0060.00316.75
8.0.280.0030.00518.49
8.0.270.0030.00517.23
8.0.260.0030.00516.85
8.0.250.0030.00616.84
8.0.240.0060.00316.82
8.0.230.0030.00516.87
8.0.220.0080.00016.78
8.0.210.0000.00816.90
8.0.200.0000.00816.82
8.0.190.0050.00516.83
8.0.180.0040.00416.96
8.0.170.0050.00516.91
8.0.160.0050.00516.85
8.0.150.0040.00416.99
8.0.140.0040.00416.83
8.0.130.0000.00713.41
8.0.120.0000.00816.75
8.0.110.0030.00616.87
8.0.100.0000.00916.88
8.0.90.0090.00016.77
8.0.80.0030.01816.99
8.0.70.0030.00516.91
8.0.60.0040.00416.87
8.0.50.0030.00616.79
8.0.30.0140.01516.82
8.0.20.0220.01017.40
8.0.10.0040.00417.02
8.0.00.0230.00816.87
7.4.330.0060.00315.00
7.4.320.0060.00316.65
7.4.300.0040.00416.69
7.4.290.0030.00616.54
7.4.280.0040.00416.61
7.4.270.0080.00016.47
7.4.260.0080.00013.25
7.4.250.0070.00316.59
7.4.240.0030.00616.57
7.4.230.0060.00316.70
7.4.220.0200.01016.59
7.4.210.0110.01116.56
7.4.200.0050.00316.58
7.4.190.0000.00816.59
7.4.160.0210.01216.39
7.4.150.0270.00417.40
7.4.140.0180.01417.86
7.4.130.0140.01616.52
7.4.120.0160.01016.54
7.4.110.0110.01416.50
7.4.100.0210.00416.48
7.4.90.0190.01816.37
7.4.80.0350.02019.39
7.4.70.0170.01816.59
7.4.60.0100.01316.50
7.4.50.0110.00016.69
7.4.40.0070.01122.77
7.4.30.0170.00816.46
7.4.00.0030.01714.79
7.3.330.0030.00313.27
7.3.320.0030.00313.20
7.3.310.0000.00816.22
7.3.300.0040.00416.36
7.3.290.0090.00916.39
7.3.280.0070.01616.40
7.3.270.0160.01017.40
7.3.260.0270.00516.37
7.3.250.0200.00816.41
7.3.240.0080.02016.57
7.3.230.0130.01316.46
7.3.210.0070.01816.66
7.3.200.0150.01019.39
7.3.190.0200.01216.53
7.3.180.0140.00716.36
7.3.170.0150.00916.78
7.3.160.0130.01016.39
7.3.120.0100.01014.84
7.3.10.0180.00716.75
7.3.00.0120.01216.64
7.2.330.0170.01116.65
7.2.320.0170.00716.88
7.2.310.0070.01816.62
7.2.300.0140.01116.76
7.2.290.0150.01216.87
7.2.130.0120.00616.75
7.2.120.0030.00916.91
7.2.110.0190.00616.70
7.2.100.0060.01216.86
7.2.90.0100.01017.00
7.2.80.0100.00316.66
7.2.70.0060.00916.84
7.2.60.0200.01016.78
7.2.50.0070.00716.52
7.2.40.0080.00816.92
7.2.30.0040.01116.80
7.2.20.0100.00716.83
7.2.10.0070.01016.78
7.2.00.0040.01018.26
7.1.250.0000.01315.63
7.1.200.0000.01215.80
7.1.100.0100.00318.18
7.1.70.0030.00617.29
7.1.60.0090.01619.32
7.1.50.0160.01016.96
7.1.00.0030.03322.52
7.0.200.0980.00015.15
7.0.140.0030.07721.97
7.0.60.0170.06720.10
7.0.50.0070.07017.89
7.0.40.0000.05020.13
7.0.30.0270.08320.21
7.0.20.0230.04020.38
7.0.10.0270.07720.07
7.0.00.0030.06020.05
5.6.280.0130.06020.93
5.6.210.0070.05020.81
5.6.200.0130.07318.16
5.6.190.0230.07020.60
5.6.180.0270.04320.34
5.6.170.0200.05320.54
5.6.160.0130.06020.54
5.6.150.0100.05318.18
5.6.140.0030.05318.28
5.6.130.0100.03718.22
5.6.120.0100.05321.01
5.6.110.0130.08021.03
5.6.100.0030.06721.18
5.6.90.0070.08321.08
5.6.80.0070.04320.42
5.6.70.0400.06320.54
5.5.350.0070.08320.47
5.5.340.0170.07018.07
5.5.330.0030.09320.58
5.5.320.0300.08020.28
5.5.310.0330.08020.19
5.5.300.0000.04717.92
5.5.290.0100.06317.99
5.5.280.0070.08720.91
5.5.270.0030.05020.90
5.5.260.0100.07020.71
5.5.250.0130.04020.59
5.5.240.0030.07020.11
5.4.450.0000.05719.32
5.4.440.0070.04319.30
5.4.430.0000.04019.27
5.4.420.0000.04319.54
5.4.410.0200.03319.28
5.4.400.0000.04718.82
5.4.390.0130.07319.21
5.4.380.0000.06719.28
5.4.370.0100.04319.16
5.4.360.0030.06719.22
5.4.350.0030.04019.31
5.4.340.0030.07018.98
5.4.320.0100.07018.99
5.4.310.0100.03719.20
5.4.300.0030.07718.99
5.4.290.0070.07019.08
5.4.280.0030.05719.06
5.4.270.0130.06719.05
5.4.260.0070.04318.98
5.4.250.0030.05019.13
5.4.240.0100.07318.85
5.4.230.0070.06718.87
5.4.220.0030.04019.14
5.4.210.0030.07018.98
5.4.200.0100.04018.97
5.4.190.0000.04719.23
5.4.180.0030.07019.17
5.4.170.0070.07319.07
5.4.160.0030.07019.18
5.4.150.0070.04318.83
5.4.140.0070.04316.39
5.4.130.0030.04016.54
5.4.120.0100.05716.54
5.4.110.0030.04016.24
5.4.100.0100.07016.59
5.4.90.0100.06316.61
5.4.80.0000.05016.66
5.4.70.0130.06716.41
5.4.60.0100.07016.48
5.4.50.0030.06016.28
5.4.40.0000.04716.48
5.4.30.0070.07716.47
5.4.20.0070.06716.58
5.4.10.0070.07016.57
5.4.00.0000.07315.84
5.3.290.0070.07714.50
5.3.280.0000.08014.55
5.3.270.0130.03714.46
5.3.260.0000.07714.46
5.3.250.0030.05714.55
5.3.240.0000.04714.44
5.3.230.0000.07714.53
5.3.220.0000.08014.43
5.3.210.0030.06314.42
5.3.200.0030.06714.44
5.3.190.0030.07714.52
5.3.180.0070.06714.47
5.3.170.0000.05014.47
5.3.160.0030.04014.42
5.3.150.0070.03714.40
5.3.140.0000.06714.43
5.3.130.0030.04714.57
5.3.120.0030.08014.50
5.3.110.0030.06014.64
5.3.100.0030.03714.01
5.3.90.0000.04313.98
5.3.80.0000.07314.04
5.3.70.0070.06713.86
5.3.60.0030.05014.05
5.3.50.0030.07314.03
5.3.40.0000.03713.90
5.3.30.0000.04313.89
5.3.20.0000.06313.64
5.3.10.0030.04013.70
5.3.00.0030.05713.54
5.2.170.0070.03713.50
5.2.160.0030.04313.50
5.2.150.0030.03013.50
5.2.140.0000.06713.50
5.2.130.0000.03713.50
5.2.120.0070.05713.50
5.2.110.0030.06013.50
5.2.100.0030.04013.50
5.2.90.0000.05713.50
5.2.80.0030.06313.50
5.2.70.0000.06313.50
5.2.60.0000.04313.50
5.2.50.0030.06313.50
5.2.40.0000.05313.50
5.2.30.0030.04713.50
5.2.20.0030.06313.50
5.2.10.0000.06313.50
5.2.00.0000.05013.50
5.1.60.0030.03013.50
5.1.50.0000.05713.50
5.1.40.0030.03713.50
5.1.30.0070.03713.50
5.1.20.0000.05013.50
5.1.10.0070.04013.50
5.1.00.0000.04013.50
5.0.50.0070.04013.50
5.0.40.0070.03713.50
5.0.30.0070.06313.50
5.0.20.0000.04713.50
5.0.10.0000.02013.50
5.0.00.0000.03013.50
4.4.90.0000.02013.50
4.4.80.0000.03713.50
4.4.70.0030.02313.50
4.4.60.0000.03713.50
4.4.50.0000.01713.50
4.4.40.0000.05313.50
4.4.30.0000.04013.50
4.4.20.0000.03313.50
4.4.10.0030.01713.50
4.4.00.0030.05013.50
4.3.110.0000.04013.50
4.3.100.0000.03313.50
4.3.90.0000.03713.50
4.3.80.0000.02313.50
4.3.70.0030.01713.50
4.3.60.0000.01713.50
4.3.50.0030.03313.50
4.3.40.0000.05313.50
4.3.30.0030.02013.50
4.3.20.0000.02013.50
4.3.10.0000.03713.50
4.3.00.0000.02313.50

preferences:
35.15 ms | 401 KiB | 5 Q