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($product_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.40.0110.00418.71
8.3.30.0140.00020.34
8.3.20.0070.00020.29
8.3.10.0040.00421.92
8.3.00.0040.00422.40
8.2.170.0170.00019.00
8.2.160.0070.00722.96
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0050.00326.16
8.2.120.0000.00821.04
8.2.110.0060.00322.25
8.2.100.0090.00317.72
8.2.90.0080.00019.05
8.2.80.0050.00219.15
8.2.70.0030.00517.50
8.2.60.0050.00318.00
8.2.50.0000.00818.07
8.2.40.0080.00017.91
8.2.30.0000.00718.09
8.2.20.0030.00617.60
8.2.10.0040.00417.72
8.2.00.0070.00517.63
8.1.270.0080.00023.99
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00423.96
8.1.230.0000.01119.01
8.1.220.0040.00417.76
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0040.00417.16
8.1.180.0000.00919.01
8.1.170.0000.00818.64
8.1.160.0040.00418.80
8.1.150.0040.00418.57
8.1.140.0000.00717.40
8.1.130.0000.00717.79
8.1.120.0000.00717.47
8.1.110.0000.00717.47
8.1.100.0000.00717.44
8.1.90.0040.00417.50
8.1.80.0070.00017.39
8.1.70.0000.00717.47
8.1.60.0050.00317.47
8.1.50.0070.00017.40
8.1.40.0060.00317.41
8.1.30.0000.00717.55
8.1.20.0090.00017.69
8.1.10.0000.00817.58
8.1.00.0000.00817.39
8.0.300.0040.00418.77
8.0.290.0040.00417.04
8.0.280.0000.00718.38
8.0.270.0000.00717.20
8.0.260.0030.00316.82
8.0.250.0030.00316.92
8.0.240.0000.00916.76
8.0.230.0000.00716.74
8.0.220.0000.00716.90
8.0.210.0020.00516.76
8.0.200.0030.00316.93
8.0.190.0040.00416.88
8.0.180.0000.00716.86
8.0.170.0070.00016.89
8.0.160.0000.00716.84
8.0.150.0070.00016.82
8.0.140.0040.00416.74
8.0.130.0060.00013.36
8.0.120.0040.00416.91
8.0.110.0040.00416.77
8.0.100.0050.00216.91
8.0.90.0030.00516.80
8.0.80.0070.01016.86
8.0.70.0070.00016.88
8.0.60.0070.00016.84
8.0.50.0000.00716.80
8.0.30.0090.00917.04
8.0.20.0100.00917.40
8.0.10.0000.00716.90
8.0.00.0050.01316.81
7.4.330.0030.00315.00
7.4.320.0060.00016.65
7.4.300.0030.00316.42
7.4.290.0000.00816.49
7.4.280.0000.00716.59
7.4.270.0030.00316.57
7.4.260.0030.00713.31
7.4.250.0070.00016.57
7.4.240.0040.00316.59
7.4.230.0040.00416.58
7.4.220.0220.00616.55
7.4.210.0080.00616.55
7.4.200.0030.00316.63
7.4.190.0000.00716.45
7.4.160.0070.01016.75
7.4.150.0070.01117.40
7.4.140.0100.00917.86
7.4.130.0090.00916.49
7.4.120.0130.00716.42
7.4.110.0170.00016.52
7.4.100.0110.01116.35
7.4.90.0050.01616.47
7.4.80.0090.00919.39
7.4.70.0030.01216.50
7.4.60.0130.00316.43
7.4.50.0030.00616.35
7.4.40.0070.01022.77
7.4.30.0150.00416.50
7.4.10.0100.00814.94
7.4.00.0070.00814.89
7.3.330.0000.00513.18
7.3.320.0050.00013.30
7.3.310.0000.00716.39
7.3.300.0000.00716.38
7.3.290.0140.00016.43
7.3.280.0090.01016.34
7.3.270.0060.01217.40
7.3.260.0000.02016.46
7.3.250.0120.00816.45
7.3.240.0130.00916.62
7.3.230.0060.01216.61
7.3.210.0120.01216.42
7.3.200.0150.00619.39
7.3.190.0030.01316.40
7.3.180.0180.00716.36
7.3.170.0060.00916.48
7.3.160.0080.01116.64
7.3.130.0090.00914.85
7.3.120.0090.00914.81
7.3.110.0080.00814.99
7.3.100.0100.00614.70
7.3.90.0010.01214.84
7.3.80.0040.00814.81
7.3.70.0040.00814.71
7.3.60.0080.00514.82
7.3.50.0050.00614.77
7.3.40.0040.00714.71
7.3.30.0090.00414.88
7.3.20.0100.00616.63
7.3.10.0050.01016.54
7.3.00.0030.01116.71
7.2.330.0060.01316.69
7.2.320.0070.01716.50
7.2.310.0090.00916.87
7.2.300.0100.00616.83
7.2.290.0040.01116.64
7.2.260.0070.01215.15
7.2.250.0100.00814.88
7.2.240.0070.01015.17
7.2.230.0060.00915.07
7.2.220.0040.00815.15
7.2.210.0060.00915.04
7.2.200.0070.00815.07
7.2.190.0070.00815.07
7.2.180.0020.01015.00
7.2.170.0060.00715.04
7.2.160.0030.01014.93
7.2.150.0070.01116.95
7.2.140.0070.00716.73
7.2.130.0080.00816.71
7.2.120.0070.00916.64
7.2.110.0080.00816.76
7.2.100.0070.00716.76
7.2.90.0050.01216.88
7.2.80.0090.00316.86
7.2.70.0060.00916.94
7.2.60.0030.01016.96
7.2.50.0080.00816.94
7.2.40.0070.00916.75
7.2.30.0100.00117.00
7.2.20.0050.01117.03
7.2.10.0060.00817.03
7.2.00.0080.00917.02
7.1.330.0060.00815.96
7.1.320.0090.00415.87
7.1.310.0040.01015.73
7.1.300.0060.00915.85
7.1.290.0040.00915.73
7.1.280.0040.00915.78
7.1.270.0010.01515.77
7.1.260.0020.00915.78
7.1.250.0070.00815.63
7.1.240.0050.01015.86
7.1.230.0060.00815.58
7.1.220.0020.01315.81
7.1.210.0060.00615.86
7.1.200.0080.00815.85
7.1.190.0060.01015.88
7.1.180.0090.00815.70
7.1.170.0060.00415.61
7.1.160.0090.00515.86
7.1.150.0030.00915.66
7.1.140.0000.01415.78
7.1.130.0100.00515.87
7.1.120.0080.00615.86
7.1.110.0050.00915.94
7.1.100.0070.00415.80
7.1.90.0040.01115.74
7.1.80.0000.01315.82
7.1.70.0020.00916.33
7.1.60.0060.00917.02
7.1.50.0060.00916.13
7.1.40.0090.00415.78
7.1.30.0050.00715.73
7.1.20.0050.00715.73
7.1.10.0070.00515.57
7.1.00.0080.02917.90
7.0.330.0050.00715.29
7.0.320.0030.00715.55
7.0.310.0040.00915.31
7.0.300.0020.01315.43
7.0.290.0080.00815.46
7.0.280.0050.00515.46
7.0.270.0060.00615.34
7.0.260.0070.00815.40
7.0.250.0070.00715.54
7.0.240.0050.00615.53
7.0.230.0060.00615.45
7.0.220.0040.00515.32
7.0.210.0050.00815.40
7.0.200.0020.00815.89
7.0.190.0030.00815.39
7.0.180.0070.00815.38
7.0.170.0040.01115.45
7.0.160.0040.00615.40
7.0.150.0050.00915.39
7.0.140.0060.02717.61
7.0.130.0090.00515.46
7.0.120.0050.01015.37
7.0.110.0080.00415.28
7.0.100.0040.02316.95
7.0.90.0110.03016.90
7.0.80.0060.02116.97
7.0.70.0110.02216.81
7.0.60.0110.01716.80
7.0.50.0090.03017.03
7.0.40.0040.02015.70
7.0.30.0060.03115.71
7.0.20.0070.03215.61
7.0.10.0030.02215.75
7.0.00.0040.03015.66
5.6.400.0040.00714.42
5.6.390.0060.01114.21
5.6.380.0100.00614.61
5.6.370.0070.01014.37
5.6.360.0050.01214.54
5.6.350.0080.00814.63
5.6.340.0070.00714.21
5.6.330.0050.00414.46
5.6.320.0050.00614.29
5.6.310.0050.00714.32
5.6.300.0050.01114.43
5.6.290.0090.00514.26
5.6.280.0090.02616.46
5.6.270.0030.00814.47
5.6.260.0050.00614.51
5.6.250.0030.03116.55
5.6.240.0010.03116.63
5.6.230.0060.02916.40
5.6.220.0040.03616.41
5.6.210.0030.02116.55
5.6.200.0070.02716.61
5.6.190.0080.03316.59
5.6.180.0070.01816.57
5.6.170.0080.03016.69
5.6.160.0090.03016.49
5.6.150.0060.02416.56
5.6.140.0070.03016.63
5.6.130.0060.02016.57
5.6.120.0060.02916.50
5.6.110.0100.02916.61
5.6.100.0040.02116.61
5.6.90.0050.03116.71
5.6.80.0080.03116.29
5.6.70.0090.01716.34
5.6.60.0090.02316.42
5.6.50.0060.03216.41
5.6.40.0060.02516.24
5.6.30.0030.02916.28
5.6.20.0080.02816.26
5.6.10.0050.02916.38
5.6.00.0060.01916.26
5.5.380.0080.02816.36
5.5.370.0060.02216.29
5.5.360.0040.02116.25
5.5.350.0060.03816.34
5.5.340.0050.02316.60
5.5.330.0100.02816.42
5.5.320.0020.03516.61
5.5.310.0070.03016.50
5.5.300.0070.02116.56
5.5.290.0060.02616.53
5.5.280.0060.02616.51
5.5.270.0020.02416.35
5.5.260.0050.02116.45
5.5.250.0090.02216.29
5.5.240.0040.01916.26
5.5.230.0060.02116.30
5.5.220.0080.02916.29
5.5.210.0070.03216.26
5.5.200.0050.02616.27
5.5.190.0070.02216.25
5.5.180.0020.02016.24
5.5.170.0050.00614.26
5.5.160.0080.02816.29
5.5.150.0090.03116.27
5.5.140.0090.01716.25
5.5.130.0050.03116.16
5.5.120.0040.02816.23
5.5.110.0050.03116.27
5.5.100.0150.01516.12
5.5.90.0020.01916.16
5.5.80.0060.01716.14
5.5.70.0060.02216.21
5.5.60.0010.03816.23
5.5.50.0100.02016.26
5.5.40.0080.01916.14
5.5.30.0020.02616.21
5.5.20.0080.02716.20
5.5.10.0080.03116.18
5.5.00.0040.01816.20
5.4.450.0010.02314.04
5.4.440.0090.02913.97
5.4.430.0090.02813.84
5.4.420.0030.03213.87
5.4.410.0030.02113.91
5.4.400.0090.02013.80
5.4.390.0060.03013.75
5.4.380.0050.03113.75
5.4.370.0060.02513.79
5.4.360.0080.02313.80
5.4.350.0040.01813.85
5.4.340.0020.03013.77
5.4.330.0090.00311.08
5.4.320.0030.01913.67
5.4.310.0050.01613.59
5.4.300.0040.01713.68
5.4.290.0040.01813.71
5.4.280.0020.01913.77
5.4.270.0030.03013.82
5.4.260.0070.02813.65
5.4.250.0020.02013.67
5.4.240.0060.02413.76
5.4.230.0050.02513.76
5.4.220.0110.01613.79
5.4.210.0030.02613.65
5.4.200.0060.02713.60
5.4.190.0040.02513.43
5.4.180.0040.01713.69
5.4.170.0040.02613.82
5.4.160.0060.01513.65
5.4.150.0040.03113.60
5.4.140.0060.01512.95
5.4.130.0050.02512.94
5.4.120.0070.02112.99
5.4.110.0060.02112.85
5.4.100.0050.01412.83
5.4.90.0050.02412.96
5.4.80.0060.01612.70
5.4.70.0050.01612.80
5.4.60.0040.02712.82
5.4.50.0040.02612.84
5.4.40.0060.01612.97
5.4.30.0060.02712.87
5.4.20.0040.02412.79
5.4.10.0080.02312.90
5.4.00.0060.02212.54
5.3.290.0030.02011.85
5.3.280.0070.02511.73
5.3.270.0030.02611.72
5.3.260.0040.02011.79
5.3.250.0060.02711.79
5.3.240.0040.02911.74
5.3.230.0040.03011.68
5.3.220.0060.03011.74
5.3.210.0050.02911.74
5.3.200.0070.01811.65
5.3.190.0100.02411.77
5.3.180.0060.01611.77
5.3.170.0030.02611.74
5.3.160.0070.02711.78
5.3.150.0060.02611.77
5.3.140.0020.01711.76
5.3.130.0050.03111.80
5.3.120.0020.02211.72
5.3.110.0020.02011.74
5.3.100.0030.02311.58
5.3.90.0050.01511.56
5.3.80.0040.01411.56
5.3.70.0010.01811.55
5.3.60.0040.01511.55
5.3.50.0070.02511.53
5.3.40.0040.02511.55
5.3.30.0030.01711.53
5.3.20.0040.02511.38
5.3.10.0040.01511.42
5.3.00.0050.01711.37
5.2.170.0000.03012.09
5.2.160.0070.02312.09
5.2.150.0030.02712.09
5.2.140.0000.04012.09
5.2.130.0070.03012.09
5.2.120.0000.06012.09
5.2.110.0030.02712.09
5.2.100.0030.05312.09
5.2.90.0000.03312.09
5.2.80.0100.05712.09
5.2.70.0030.04012.09
5.2.60.0000.05712.09
5.2.50.0030.04312.09
5.2.40.0030.03012.09
5.2.30.0000.04312.09
5.2.20.0000.03712.09
5.2.10.0030.06012.09
5.2.00.0030.04712.09
5.1.60.0000.02312.09
5.1.50.0100.04712.09
5.1.40.0030.03312.09
5.1.30.0100.05012.09
5.1.20.0070.04312.09
5.1.10.0030.05012.09
5.1.00.0030.02312.09
5.0.50.0000.03712.09
5.0.40.0000.02312.09
5.0.30.0070.05312.09
5.0.20.0000.03712.09
5.0.10.0000.02312.09
5.0.00.0030.05712.09
4.4.90.0000.03312.09
4.4.80.0030.03012.09
4.4.70.0000.03012.09
4.4.60.0030.01312.09
4.4.50.0030.03012.09
4.4.40.0000.05312.09
4.4.30.0000.03712.09
4.4.20.0030.01312.09
4.4.10.0000.03012.09
4.4.00.0030.02712.09
4.3.110.0000.04012.09
4.3.100.0070.03012.09
4.3.90.0000.02012.09
4.3.80.0100.04012.09
4.3.70.0000.02012.09
4.3.60.0030.02712.09
4.3.50.0000.02712.09
4.3.40.0030.03012.09
4.3.30.0000.01712.09
4.3.20.0030.01312.09
4.3.10.0000.03312.09
4.3.00.0030.03012.09

preferences:
36.35 ms | 400 KiB | 5 Q