3v4l.org

run code in 300+ PHP versions simultaneously
<?php $str = "800"; function getCombinations($array) { //initalize array $results = [[]]; //get all combinations foreach ($array as $k => $element) { foreach ($results as $combination) $results[] = $combination + [$k => $element]; } //return filtered array return array_values(array_filter($results)); } $arr = getCombinations(str_split("", $str)); foreach($arr as $v) echo implode(" ", $v) . "<br />";

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.0140.00016.50
8.3.50.0070.01521.15
8.3.40.0140.00018.41
8.3.30.0100.00318.54
8.3.20.0040.00420.30
8.3.10.0040.00421.90
8.3.00.0040.00423.36
8.2.180.0130.00616.50
8.2.170.0140.00322.96
8.2.160.0100.00320.35
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0040.00421.11
8.2.120.0040.00426.35
8.2.110.0100.00021.18
8.2.100.0120.00017.80
8.2.90.0040.00419.22
8.2.80.0000.00817.97
8.2.70.0060.00317.63
8.2.60.0040.00418.16
8.2.50.0060.00318.07
8.2.40.0000.00922.38
8.2.30.0040.00419.50
8.2.20.0050.00317.70
8.2.10.0050.00318.01
8.2.00.0050.00318.13
8.1.280.0070.01025.92
8.1.270.0060.01323.79
8.1.260.0000.00728.09
8.1.250.0050.00228.09
8.1.240.0000.01022.60
8.1.230.0100.00517.76
8.1.220.0000.00817.74
8.1.210.0060.00318.77
8.1.200.0030.00617.22
8.1.190.0000.00817.13
8.1.180.0040.00418.10
8.1.170.0090.00018.64
8.1.160.0050.00320.79
8.1.150.0040.00420.59
8.1.140.0040.00419.59
8.1.130.0030.00317.71
8.1.120.0080.00017.33
8.1.110.0070.00017.36
8.1.100.0040.00417.37
8.1.90.0000.00817.35
8.1.80.0030.00517.47
8.1.70.0000.00717.46
8.1.60.0030.00617.65
8.1.50.0080.00017.45
8.1.40.0000.01017.43
8.1.30.0030.00517.64
8.1.20.0080.00017.61
8.1.10.0000.00717.55
8.1.00.0060.00317.43
8.0.300.0040.00418.77
8.0.290.0050.00216.75
8.0.280.0030.00518.41
8.0.270.0070.00017.19
8.0.260.0060.00017.32
8.0.250.0000.00717.03
8.0.240.0000.00617.02
8.0.230.0030.00317.01
8.0.220.0070.00016.95
8.0.210.0000.00716.95
8.0.200.0070.00017.07
8.0.190.0040.00416.98
8.0.180.0050.00217.02
8.0.170.0060.00317.05
8.0.160.0000.00816.88
8.0.150.0040.00416.98
8.0.140.0040.00316.93
8.0.130.0000.00513.41
8.0.120.0050.00316.99
8.0.110.0040.00416.79
8.0.100.0090.00017.00
8.0.90.0070.00016.94
8.0.80.0060.00917.01
8.0.70.0000.00816.79
8.0.60.0040.00417.02
8.0.50.0040.00417.03
8.0.30.0110.00917.02
8.0.20.0110.00817.40
8.0.10.0070.00016.90
8.0.00.0120.00716.80
7.4.330.0050.00016.89
7.4.320.0030.00316.64
7.4.300.0000.00716.51
7.4.290.0070.00016.37
7.4.280.0040.00416.50
7.4.270.0030.00316.60
7.4.260.0000.00716.60
7.4.250.0000.00716.47
7.4.240.0030.00316.58
7.4.230.0040.00416.64
7.4.220.0120.00916.62
7.4.210.0000.01716.65
7.4.200.0000.00816.68
7.4.160.0120.00316.38
7.4.150.0080.00817.40
7.4.140.0040.01417.86
7.4.130.0130.01016.58
7.4.120.0110.00616.68
7.4.110.0100.00716.65
7.4.100.0140.00316.61
7.4.90.0070.01016.46
7.4.80.0100.00719.39
7.4.70.0110.01116.43
7.4.60.0090.00616.33
7.4.50.0160.00016.61
7.4.40.0070.01016.51
7.4.30.0100.01016.66
7.4.10.0120.00614.86
7.4.00.0050.01114.96
7.3.330.0020.00213.22
7.3.320.0060.00013.32
7.3.310.0020.00516.41
7.3.300.0030.00316.23
7.3.290.0120.00416.31
7.3.280.0060.01016.38
7.3.270.0110.00717.40
7.3.260.0040.01416.57
7.3.250.0090.00816.40
7.3.240.0100.00716.43
7.3.230.0080.00816.64
7.3.210.0110.00616.48
7.3.200.0070.01119.39
7.3.190.0120.00616.53
7.3.180.0100.00716.59
7.3.170.0120.00816.45
7.3.160.0060.01516.51
7.3.130.0070.00714.83
7.3.120.0100.00714.92
7.3.110.0090.00714.75
7.3.100.0060.00914.74
7.3.90.0070.00814.92
7.3.80.0030.01014.89
7.3.70.0030.00814.68
7.3.60.0080.00814.87
7.3.50.0040.00914.69
7.3.40.0100.00014.77
7.3.30.0050.00814.77
7.3.20.0040.01016.41
7.3.10.0020.00916.49
7.3.00.0050.01016.61
7.2.330.0060.01516.58
7.2.320.0120.00916.77
7.2.310.0090.00916.42
7.2.300.0090.00716.45
7.2.290.0080.00816.88
7.2.260.0070.01115.20
7.2.250.0070.00814.87
7.2.240.0030.01115.11
7.2.230.0060.00915.04
7.2.220.0050.00915.03
7.2.210.0050.01015.08
7.2.200.0020.01015.05
7.2.190.0030.01215.06
7.2.180.0110.00114.99
7.2.170.0060.00714.95
7.2.160.0030.01314.93
7.2.150.0040.01116.68
7.2.140.0060.00616.89
7.2.130.0030.00916.68
7.2.120.0120.00416.97
7.2.110.0070.00716.67
7.2.100.0030.01116.85
7.2.90.0000.01516.76
7.2.80.0030.01017.05
7.2.70.0050.00816.97
7.2.60.0090.00617.14
7.2.50.0030.01216.79
7.2.40.0070.01017.05
7.2.30.0060.01217.00
7.2.20.0040.01217.07
7.2.10.0080.00816.91
7.2.00.0100.00617.99
7.1.330.0090.00415.86
7.1.320.0040.00815.84
7.1.310.0070.00715.79
7.1.300.0050.00715.58
7.1.290.0040.00915.73
7.1.280.0030.00615.33
7.1.270.0040.00915.67
7.1.260.0060.00815.69
7.1.250.0080.00415.51
7.1.240.0000.01515.44
7.1.230.0110.00315.65
7.1.220.0030.00715.44
7.1.210.0130.00315.65
7.1.200.0030.00615.67
7.1.190.0070.00315.71
7.1.180.0030.01315.98
7.1.170.0090.00615.96
7.1.160.0060.00915.78
7.1.150.0080.00415.45
7.1.140.0070.00715.67
7.1.130.0030.01615.74
7.1.120.0030.00915.88
7.1.110.0060.00615.64
7.1.100.0010.00916.95
7.1.90.0060.00916.00
7.1.80.0000.01415.57
7.1.70.0090.00316.57
7.1.60.0100.00817.54
7.1.50.0050.01116.40
7.1.40.0080.00315.78
7.1.30.0040.00715.77
7.1.20.0040.00815.54
7.1.10.0060.00315.87
7.1.00.0070.04119.14
7.0.330.0030.00615.41
7.0.320.0060.00615.39
7.0.310.0080.00415.39
7.0.300.0090.00015.33
7.0.290.0040.01215.45
7.0.280.0060.00615.45
7.0.270.0120.00615.43
7.0.260.0060.00615.29
7.0.250.0000.01515.34
7.0.240.0000.01215.54
7.0.230.0080.00615.64
7.0.220.0030.01315.41
7.0.210.0090.00015.46
7.0.200.0190.00614.90
7.0.190.0070.00715.43
7.0.180.0090.00015.29
7.0.170.0000.01415.52
7.0.160.0070.00715.24
7.0.150.0030.01315.42
7.0.140.0000.01615.38
7.0.130.0070.00715.34
7.0.120.0000.01215.27
7.0.110.0070.01015.53
7.0.100.0130.00315.27
7.0.90.0030.01015.36
7.0.80.0000.01115.40
7.0.70.0070.00715.41
7.0.60.0090.03718.53
7.0.50.0050.02416.76
7.0.40.0070.04516.83
7.0.30.0200.03216.79
7.0.20.0220.04516.96
7.0.10.0050.03416.83
7.0.00.0050.02816.79
5.6.400.0000.01114.56
5.6.390.0060.00914.69
5.6.380.0080.00414.55
5.6.370.0030.00914.56
5.6.360.0000.00914.10
5.6.350.0060.01014.39
5.6.340.0110.00014.62
5.6.330.0090.00614.57
5.6.320.0030.01014.32
5.6.310.0100.00314.63
5.6.300.0030.01014.45
5.6.290.0030.00614.48
5.6.280.0040.03417.86
5.6.270.0000.01014.74
5.6.260.0060.00614.31
5.6.250.0120.00314.48
5.6.240.0040.01114.50
5.6.230.0070.00714.79
5.6.220.0060.00914.25
5.6.210.0050.04217.39
5.6.200.0100.04516.19
5.6.190.0100.02917.25
5.6.180.0180.02817.38
5.6.170.0170.04417.54
5.6.160.0050.04817.42
5.6.150.0070.02816.29
5.6.140.0070.02716.46
5.6.130.0050.02916.18
5.6.120.0030.02617.71
5.6.110.0040.04717.65
5.6.100.0070.04717.88
5.6.90.0070.03517.81
5.6.80.0070.04017.31
5.6.70.0060.00614.65
5.6.60.0030.01214.46
5.6.50.0040.01114.47
5.6.40.0040.00814.46
5.6.30.0110.00014.29
5.6.20.0090.00614.34
5.6.10.0030.01314.11
5.6.00.0070.01314.31
5.5.380.0000.01714.66
5.5.370.0150.00414.21
5.5.360.0090.01214.26
5.5.350.2020.02817.41
5.5.340.0060.03116.16
5.5.330.0080.03617.39
5.5.320.0200.02417.28
5.5.310.0200.03717.46
5.5.300.0070.02816.07
5.5.290.0070.04516.17
5.5.280.0080.03217.80
5.5.270.0020.02817.62
5.5.260.0100.03217.54
5.5.250.0100.04017.43
5.5.240.0110.02217.11
5.5.230.0030.00914.13
5.5.220.0100.00714.05
5.5.210.0130.00313.93
5.5.200.0060.01014.29
5.5.190.0030.01314.29
5.5.180.0070.01114.39
5.5.170.0130.00314.24
5.5.160.0060.01214.32
5.5.150.0000.01614.27
5.5.140.0060.00614.45
5.5.130.0030.01313.92
5.5.120.0040.00714.25
5.5.110.0000.00814.66
5.5.100.0030.00914.32
5.5.90.0060.00914.45
5.5.80.0120.00614.47
5.5.70.0030.01314.23
5.5.60.0030.01114.13
5.5.50.0030.00614.34
5.5.40.0040.00714.37
5.5.30.0000.00914.44
5.5.20.0060.00614.23
5.5.10.0060.00614.13
5.5.00.0030.01014.36

preferences:
47.46 ms | 401 KiB | 5 Q