3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 'A' => array(1, 2, 3, 4), 'B' => array(5, 6), 'C' => array('a', 'b', 'c')); $values=""; function makeCombinations($array,$values){ if(is_array($array)) { foreach($array as $value) { makeCombinations($value,$values); } } else { $values.=$array; } } makeCombinations($array); echo $values;

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.00418.56
8.3.50.0110.00721.09
8.3.40.0090.00618.67
8.3.30.0130.00319.01
8.3.20.0080.00020.24
8.3.10.0080.00021.95
8.3.00.0080.00022.51
8.2.180.0090.01316.63
8.2.170.0100.00722.96
8.2.160.0110.00419.20
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0000.00819.54
8.2.110.0030.00722.07
8.2.100.0080.00417.91
8.2.90.0030.00517.84
8.2.80.0050.00317.97
8.2.70.0090.00017.50
8.2.60.0080.00017.80
8.2.50.0040.00418.07
8.2.40.0050.00319.79
8.2.30.0000.00817.90
8.2.20.0000.00817.71
8.2.10.0000.00717.74
8.2.00.0000.00817.61
8.1.280.0100.01025.92
8.1.270.0040.00418.49
8.1.260.0080.00026.35
8.1.250.0000.00728.09
8.1.240.0000.00922.53
8.1.230.0070.00420.88
8.1.220.0040.00417.74
8.1.210.0040.00418.77
8.1.200.0040.00417.23
8.1.190.0030.00617.43
8.1.180.0030.00518.61
8.1.170.0050.00318.60
8.1.160.0050.00322.19
8.1.150.0000.00818.52
8.1.140.0040.00417.29
8.1.130.0030.00517.74
8.1.120.0070.00017.42
8.1.110.0040.00417.27
8.1.100.0070.00017.38
8.1.90.0070.00017.30
8.1.80.0000.00717.35
8.1.70.0000.00817.41
8.1.60.0040.00417.63
8.1.50.0000.00817.54
8.1.40.0050.00317.47
8.1.30.0000.00817.52
8.1.20.0000.00817.67
8.1.10.0000.00817.55
8.1.00.0040.00417.50
8.0.300.0040.00419.95
8.0.290.0040.00417.18
8.0.280.0000.00718.32
8.0.270.0030.00317.08
8.0.260.0070.00016.78
8.0.250.0040.00416.96
8.0.240.0000.00817.02
8.0.230.0030.00316.93
8.0.220.0050.00316.77
8.0.210.0030.00416.93
8.0.200.0000.00716.84
8.0.190.0000.00917.02
8.0.180.0000.00716.95
8.0.170.0070.00016.74
8.0.160.0000.00716.89
8.0.150.0040.00416.87
8.0.140.0040.00416.89
8.0.130.0030.00313.39
8.0.120.0040.00416.88
8.0.110.0040.00416.95
8.0.100.0070.00016.88
8.0.90.0040.00416.95
8.0.80.0000.01416.93
8.0.70.0040.00416.93
8.0.60.0070.00016.83
8.0.50.0000.00816.83
8.0.30.0090.01117.06
8.0.20.0100.00717.40
8.0.10.0000.00716.97
8.0.00.0090.00816.68
7.4.330.0000.00515.05
7.4.320.0070.00016.29
7.4.300.0030.00316.54
7.4.290.0000.00716.44
7.4.280.0030.00316.63
7.4.270.0030.00316.59
7.4.260.0060.00016.56
7.4.250.0000.00716.41
7.4.240.0020.00616.55
7.4.230.0070.00016.57
7.4.220.0100.00716.68
7.4.210.0080.01216.56
7.4.200.0000.00716.62
7.4.190.0050.00216.42
7.4.160.0150.00616.54
7.4.150.0060.01217.40
7.4.140.0120.00917.86
7.4.130.0100.00716.55
7.4.120.0110.00616.65
7.4.110.0100.00716.71
7.4.100.0150.00316.39
7.4.90.0080.01116.59
7.4.80.0110.01119.39
7.4.70.0150.00316.45
7.4.60.0140.00316.46
7.4.50.0000.00816.40
7.4.40.0080.00822.77
7.4.30.0140.00716.45
7.4.00.0060.01014.80
7.3.330.0030.00313.11
7.3.320.0030.00313.30
7.3.310.0000.00816.20
7.3.300.0070.00016.30
7.3.290.0120.00316.21
7.3.280.0100.00816.26
7.3.270.0120.01217.40
7.3.260.0090.00916.49
7.3.250.0090.00816.40
7.3.240.0080.00816.52
7.3.230.0130.00616.39
7.3.210.0110.00616.48
7.3.200.0130.00319.39
7.3.190.0070.01416.27
7.3.180.0080.01516.31
7.3.170.0140.00416.46
7.3.160.0060.00916.56
7.3.120.0000.01415.00
7.3.110.0030.01214.57
7.3.100.0080.00614.63
7.3.90.0080.00814.80
7.3.80.0040.00714.77
7.3.70.0030.01514.70
7.3.60.0000.01014.72
7.3.50.0030.00614.75
7.3.40.0100.00714.86
7.3.30.0070.00714.57
7.3.20.0070.00416.56
7.3.10.0060.01016.73
7.3.00.0070.00716.61
7.2.330.0120.00616.59
7.2.320.0160.00016.47
7.2.310.0140.00316.57
7.2.300.0040.01316.59
7.2.290.0100.00716.46
7.2.240.0120.00015.15
7.2.230.0030.01314.84
7.2.220.0030.01414.84
7.2.210.0000.01615.03
7.2.200.0030.00714.88
7.2.190.0060.01014.89
7.2.180.0070.00714.94
7.2.170.0000.01114.75
7.2.160.0110.00414.78
7.2.150.0040.01116.80
7.2.140.0080.00416.81
7.2.130.0030.01416.61
7.2.120.0040.01116.86
7.2.110.0030.00916.53
7.2.100.0070.00316.71
7.2.90.0040.01116.85
7.2.80.0080.00816.73
7.2.70.0060.00916.79
7.2.60.0050.00916.65
7.2.50.0040.01116.83
7.2.40.0000.01316.66
7.2.30.0040.00816.88
7.2.20.0030.00716.78
7.2.10.0040.00716.86
7.2.00.0070.00417.93
7.1.330.0080.00615.88
7.1.320.0120.00015.57
7.1.310.0040.01115.66
7.1.300.0120.00315.57
7.1.290.0040.01115.69
7.1.280.0070.00715.49
7.1.270.0040.00815.73
7.1.260.0000.01615.75
7.1.250.0030.00715.54
7.1.200.0030.00615.52
7.1.100.0070.00718.27
7.1.70.0000.00717.10
7.1.60.0170.00719.82
7.1.50.0160.00616.91
7.1.00.0030.06022.36
7.0.200.0030.00616.83
7.0.140.0070.07322.18
7.0.60.0100.08020.06
7.0.50.0030.05717.95
7.0.40.0070.04320.30
7.0.30.0230.04720.20
7.0.20.0230.06320.22
7.0.10.0270.07720.16
7.0.00.0230.05020.10
5.6.280.0130.06320.99
5.6.210.0030.04020.48
5.6.200.0100.07718.16
5.6.190.0100.09320.63
5.6.180.4330.03720.50
5.6.170.0270.04720.43
5.6.160.0100.08020.54
5.6.150.0030.04318.15
5.6.140.0070.08318.14
5.6.130.0130.07318.18
5.6.120.0030.07321.04
5.6.110.0200.06021.02
5.6.100.0100.07720.99
5.6.90.0100.07320.99
5.6.80.0030.05320.52
5.6.70.0100.08720.53
5.5.350.0300.06320.47
5.5.340.0070.09017.98
5.5.330.0030.08720.45
5.5.320.0200.04020.29
5.5.310.0200.04720.30
5.5.300.0070.04017.98
5.5.290.0130.04018.05
5.5.280.0100.04320.88
5.5.270.0130.04720.86
5.5.260.0100.08020.64
5.5.250.0130.07720.59
5.5.240.0170.05720.29
5.4.450.0670.07319.45
5.4.440.0070.06019.58
5.4.430.0630.05719.22
5.4.420.0930.06019.27
5.4.410.1070.07719.10
5.4.400.0130.06018.78
5.4.390.1100.05318.73
5.4.380.0430.06718.70
5.4.370.0170.05018.41
5.4.360.0100.05718.74
5.4.350.0100.05718.68
5.4.340.0200.04718.79
5.4.320.0110.03412.51
5.4.310.0070.05412.50
5.4.300.0030.03912.50
5.4.290.0060.04012.50
5.4.280.0080.03312.40
5.4.270.0070.03912.39
5.4.260.0060.04312.40
5.4.250.0100.05718.84
5.4.240.0130.07318.84
5.4.230.0130.05018.80
5.4.220.0070.05719.09
5.4.210.0070.06319.01
5.4.200.0130.04718.75
5.4.190.0130.04719.05
5.4.180.0030.05718.94
5.4.170.0030.05718.65
5.4.160.0030.05718.64
5.4.150.0130.06018.64
5.4.140.0070.05016.51
5.4.130.0070.05716.38
5.4.120.0130.06716.57
5.4.110.0000.05716.62
5.4.100.0070.07716.34
5.4.90.0100.04316.50
5.4.80.0130.06016.48
5.4.70.0030.06716.46
5.4.60.0100.05016.31
5.4.50.0030.07016.38
5.4.40.0130.04716.52
5.4.30.0070.07316.44
5.4.20.0070.07016.46
5.4.10.0170.06016.38
5.4.00.0030.05315.95
5.3.290.0110.04212.80
5.3.280.0130.07014.58
5.3.270.0130.05314.62
5.3.260.0170.06014.44
5.3.250.0070.07014.69
5.3.240.0130.05314.69
5.3.230.0130.04714.77
5.3.220.0030.05314.75
5.3.210.0100.05014.40
5.3.200.0000.05714.65
5.3.190.0070.07314.75
5.3.180.0070.05014.56
5.3.170.0070.05014.64
5.3.160.0000.06014.53
5.3.150.0100.05314.54
5.3.140.0070.05314.69
5.3.130.0170.07014.77
5.3.120.0070.07714.63
5.3.110.0030.07714.69
5.3.100.0200.05714.12
5.3.90.0070.07314.09
5.3.80.0170.04314.04
5.3.70.0070.05713.85
5.3.60.0100.04714.08
5.3.50.0000.06013.94
5.3.40.0200.05013.86
5.3.30.0070.04714.09
5.3.20.0030.06013.68
5.3.10.0100.04313.73
5.3.00.0200.06313.86
5.2.170.0070.04011.05
5.2.160.0070.04011.23
5.2.150.0000.06311.36
5.2.140.0030.04311.30
5.2.130.0130.03011.19
5.2.120.0000.04311.32
5.2.110.0130.03711.19
5.2.100.0030.04711.05
5.2.90.0070.05011.07
5.2.80.0030.04311.17
5.2.70.0070.04310.93
5.2.60.0000.04311.13
5.2.50.0100.04011.00
5.2.40.0130.04311.07
5.2.30.0100.05011.05
5.2.20.0130.03310.93
5.2.10.0070.05010.90
5.2.00.0070.04010.68
5.1.60.0070.04710.09
5.1.50.0130.0279.99
5.1.40.0100.0409.94
5.1.30.0130.02710.28
5.1.20.0030.05310.45
5.1.10.0170.03710.07
5.1.00.0000.04010.03
5.0.50.0030.0338.54
5.0.40.0070.0308.48
5.0.30.0030.0608.27
5.0.20.0000.0338.25
5.0.10.0070.0238.26
5.0.00.0070.0378.13
4.4.90.0100.0237.46
4.4.80.0070.0207.46
4.4.70.0000.0337.46
4.4.60.0070.0277.46
4.4.50.0000.0337.46
4.4.40.0000.0377.46
4.4.30.0070.0277.46
4.4.20.0030.0237.46
4.4.10.0030.0207.46
4.4.00.0070.0307.46
4.3.110.0000.0337.46
4.3.100.0030.0307.46
4.3.90.0000.0237.46
4.3.80.0070.0307.46
4.3.70.0000.0337.46
4.3.60.0000.0337.46
4.3.50.0030.0207.46
4.3.40.0000.0337.46
4.3.30.0000.0307.46
4.3.20.0000.0237.46
4.3.10.0070.0207.46
4.3.00.0030.0207.19

preferences:
44.85 ms | 401 KiB | 5 Q