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; } return $values; } $values=makeCombinations($array,$values); 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.40.0090.00618.67
8.3.30.0070.00719.07
8.3.20.0040.00420.33
8.3.10.0040.00422.13
8.3.00.0030.00622.39
8.2.170.0130.00722.96
8.2.160.0030.01019.03
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0000.00819.78
8.2.110.0110.00020.51
8.2.100.0040.00719.63
8.2.90.0030.00519.30
8.2.80.0050.00317.97
8.2.70.0060.00317.38
8.2.60.0060.00318.16
8.2.50.0000.00818.07
8.2.40.0000.00819.88
8.2.30.0000.00718.11
8.2.20.0040.00417.82
8.2.10.0040.00417.75
8.2.00.0000.00717.65
8.1.270.0040.00418.70
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0060.00323.80
8.1.230.0090.00319.01
8.1.220.0000.00817.76
8.1.210.0040.00418.77
8.1.200.0030.00617.35
8.1.190.0030.00617.53
8.1.180.0040.00418.70
8.1.170.0000.00818.51
8.1.160.0040.00422.04
8.1.150.0040.00418.64
8.1.140.0070.00017.41
8.1.130.0000.00717.71
8.1.120.0000.00717.41
8.1.110.0030.00617.39
8.1.100.0000.00717.49
8.1.90.0000.00717.36
8.1.80.0040.00417.36
8.1.70.0030.00317.39
8.1.60.0040.00417.53
8.1.50.0000.00817.43
8.1.40.0000.00817.47
8.1.30.0030.00517.51
8.1.20.0000.00817.64
8.1.10.0050.00217.52
8.1.00.0080.00017.41
8.0.300.0030.00618.77
8.0.290.0040.00417.18
8.0.280.0040.00418.46
8.0.270.0030.00317.27
8.0.260.0030.00316.83
8.0.250.0000.00716.86
8.0.240.0000.00816.96
8.0.230.0040.00416.88
8.0.220.0030.00316.93
8.0.210.0000.00716.90
8.0.200.0000.00616.84
8.0.190.0040.00416.95
8.0.180.0040.00416.82
8.0.170.0040.00416.93
8.0.160.0000.00716.88
8.0.150.0040.00416.83
8.0.140.0000.00716.83
8.0.130.0060.00013.33
8.0.120.0040.00416.88
8.0.110.0050.00316.80
8.0.100.0000.00716.80
8.0.90.0000.00716.98
8.0.80.0030.01216.93
8.0.70.0000.00716.89
8.0.60.0030.00616.90
8.0.50.0070.00016.95
8.0.30.0070.01116.93
8.0.20.0050.01417.40
8.0.10.0030.00316.96
8.0.00.0090.01016.63
7.4.330.0040.00015.00
7.4.320.0000.00616.56
7.4.300.0000.00616.36
7.4.290.0030.00316.51
7.4.280.0080.00016.55
7.4.270.0030.00316.61
7.4.260.0000.00716.48
7.4.250.0020.00516.55
7.4.240.0050.00216.57
7.4.230.0000.00716.58
7.4.220.0150.00316.67
7.4.210.0080.01016.55
7.4.200.0030.00316.55
7.4.190.0040.00416.40
7.4.160.0110.00816.27
7.4.150.0100.00717.40
7.4.140.0090.01117.86
7.4.130.0100.00716.54
7.4.120.0110.01116.49
7.4.110.0100.00716.62
7.4.100.0090.00916.49
7.4.90.0030.01416.52
7.4.80.0120.00619.39
7.4.70.0140.00716.34
7.4.60.0030.01316.57
7.4.50.0040.00416.61
7.4.40.0000.01522.77
7.4.30.0090.00916.45
7.4.00.0070.01014.77
7.3.330.0030.00313.19
7.3.320.0000.00513.19
7.3.310.0040.00416.24
7.3.300.0030.00316.23
7.3.290.0110.00316.40
7.3.280.0060.01116.36
7.3.270.0120.00617.40
7.3.260.0110.00716.64
7.3.250.0070.01016.51
7.3.240.0130.00316.35
7.3.230.0130.00316.39
7.3.210.0080.00816.43
7.3.200.0180.00019.39
7.3.190.0050.01116.65
7.3.180.0070.01016.34
7.3.170.0130.00916.31
7.3.160.0030.01216.73
7.3.120.0070.00814.70
7.3.110.0110.00714.67
7.3.100.0040.01515.01
7.3.90.0100.00714.98
7.3.80.0040.01114.58
7.3.70.0080.00414.88
7.3.60.0120.00315.00
7.3.50.0100.00714.81
7.3.40.0080.00414.72
7.3.30.0030.00714.92
7.3.20.0000.01816.63
7.3.10.0070.00716.43
7.3.00.0070.00416.33
7.2.330.0080.00816.49
7.2.320.0150.00616.69
7.2.310.0140.00316.79
7.2.300.0120.00916.71
7.2.290.0030.01216.73
7.2.250.0070.01315.20
7.2.240.0000.02015.31
7.2.230.0150.00415.02
7.2.220.0070.01115.04
7.2.210.0070.00714.96
7.2.200.0050.00814.93
7.2.190.0060.00915.21
7.2.180.0110.00315.21
7.2.170.0000.01115.10
7.2.130.0040.00716.97
7.2.120.0040.00716.99
7.2.110.0040.00816.83
7.2.100.0080.00416.81
7.2.90.0090.00616.89
7.2.80.0000.01416.80
7.2.70.0060.00916.96
7.2.60.0110.00316.96
7.2.50.0030.00716.77
7.2.40.0030.01016.80
7.2.30.0080.00316.96
7.2.20.0100.00317.11
7.2.10.0060.00916.96
7.2.00.0030.00818.28
7.1.330.0070.00715.57
7.1.320.0070.00415.79
7.1.310.0060.00615.82
7.1.300.0110.00415.83
7.1.290.0070.00315.84
7.1.280.0090.00015.46
7.1.270.0100.00315.89
7.1.260.0080.00415.77
7.1.250.0090.00015.85
7.1.100.0060.01218.12
7.1.70.0040.01117.18
7.1.60.0030.02119.82
7.1.50.0100.01017.11
7.1.00.0000.03722.41
7.0.200.0000.00716.66
7.0.140.0070.07021.92
7.0.60.0070.07719.97
7.0.50.0070.05017.83
7.0.40.0000.04720.41
7.0.30.0370.07720.09
7.0.20.0200.05320.16
7.0.10.0230.05720.16
7.0.00.0170.06720.30
5.6.280.0030.07021.13
5.6.210.0070.03720.67
5.6.200.0070.03718.12
5.6.190.0130.08020.39
5.6.180.3430.04320.49
5.6.170.0230.05020.40
5.6.160.0100.08020.46
5.6.150.0030.08718.18
5.6.140.0070.05718.23
5.6.130.0100.07718.28
5.6.120.0030.04321.00
5.6.110.0100.07721.09
5.6.100.0030.04721.01
5.6.90.0130.05320.97
5.6.80.0070.08320.38
5.6.70.0200.06320.38
5.5.350.0170.08320.44
5.5.340.0030.07017.95
5.5.330.0070.07720.29
5.5.320.0300.07320.30
5.5.310.0230.08320.37
5.5.300.0030.04318.01
5.5.290.0070.04317.96
5.5.280.0100.08020.88
5.5.270.0070.04720.72
5.5.260.0070.04720.61
5.5.250.0170.06720.66
5.5.240.0130.07320.19
5.4.450.0670.05719.47
5.4.440.0700.06319.19
5.4.430.1270.07319.66
5.4.420.0100.06019.21
5.4.410.1430.06719.34
5.4.400.1400.04718.84
5.4.390.0170.05018.58
5.4.380.0430.06718.78
5.4.370.0230.04318.70
5.4.360.0200.04318.50
5.4.350.0170.05018.73
5.4.340.0130.05318.79
5.4.320.0090.04012.50
5.4.310.0060.03812.50
5.4.300.0100.03712.50
5.4.290.0080.04212.50
5.4.280.0050.03512.39
5.4.270.0090.03612.40
5.4.260.0060.03812.40
5.4.250.0030.05718.76
5.4.240.0100.07719.08
5.4.230.0030.08018.79
5.4.220.0030.06018.61
5.4.210.0170.07018.99
5.4.200.0000.05718.93
5.4.190.0170.07019.02
5.4.180.0030.05318.93
5.4.170.0100.07718.75
5.4.160.0030.08018.77
5.4.150.0030.06718.88
5.4.140.0200.05016.59
5.4.130.0100.06716.55
5.4.120.0100.07016.38
5.4.110.0130.04716.38
5.4.100.0030.05316.46
5.4.90.0070.04716.46
5.4.80.0070.07016.47
5.4.70.0100.06716.30
5.4.60.0100.07016.37
5.4.50.0030.05316.62
5.4.40.0070.06316.48
5.4.30.0030.05316.32
5.4.20.0100.05316.52
5.4.10.0030.07716.29
5.4.00.0070.05316.04
5.3.290.0090.04012.80
5.3.280.0070.05314.62
5.3.270.0170.04314.68
5.3.260.0170.06714.67
5.3.250.0030.06314.82
5.3.240.0130.07314.63
5.3.230.0000.08014.68
5.3.220.0070.05314.64
5.3.210.0030.06714.39
5.3.200.0100.05014.63
5.3.190.0170.06314.63
5.3.180.0170.04014.75
5.3.170.0100.05014.63
5.3.160.0030.05314.54
5.3.150.0100.05314.55
5.3.140.0100.05714.79
5.3.130.0170.04314.63
5.3.120.0100.05014.77
5.3.110.0270.05314.55
5.3.100.0130.04714.26
5.3.90.0130.07014.11
5.3.80.0130.06014.09
5.3.70.0030.05014.02
5.3.60.0100.04714.13
5.3.50.0070.04714.02
5.3.40.0100.04714.02
5.3.30.0100.04713.74
5.3.20.0200.05713.77
5.3.10.0100.07313.73
5.3.00.0030.05313.64
5.2.170.0070.04011.12
5.2.160.0170.04711.14
5.2.150.0030.04310.97
5.2.140.0070.04011.22
5.2.130.0030.04711.10
5.2.120.0030.06011.27
5.2.110.0000.06011.18
5.2.100.0100.04011.00
5.2.90.0070.04011.26
5.2.80.0000.04711.04
5.2.70.0100.04011.31
5.2.60.0030.04711.13
5.2.50.0170.03310.98
5.2.40.0030.04011.07
5.2.30.0030.05711.04
5.2.20.0030.04011.14
5.2.10.0070.04710.84
5.2.00.0030.04310.90
5.1.60.0100.03710.23
5.1.50.0030.0379.95
5.1.40.0030.03310.18
5.1.30.0000.04010.39
5.1.20.0030.03710.33
5.1.10.0030.04310.16
5.1.00.0030.04010.05
5.0.50.0000.0308.64
5.0.40.0000.0308.50
5.0.30.0000.0438.29
5.0.20.0000.0378.16
5.0.10.0100.0238.41
5.0.00.0000.0538.25
4.4.90.0100.0177.46
4.4.80.0030.0307.46
4.4.70.0070.0177.46
4.4.60.0000.0237.46
4.4.50.0000.0307.46
4.4.40.0070.0307.46
4.4.30.0070.0177.46
4.4.20.0000.0337.46
4.4.10.0000.0277.46
4.4.00.0030.0437.46
4.3.110.0030.0207.46
4.3.100.0070.0207.46
4.3.90.0130.0207.46
4.3.80.0000.0377.46
4.3.70.0000.0237.46
4.3.60.0070.0207.46
4.3.50.0070.0237.46
4.3.40.0000.0337.46
4.3.30.0070.0207.46
4.3.20.0000.0237.46
4.3.10.0000.0237.46
4.3.00.0070.0207.19

preferences:
45.01 ms | 400 KiB | 5 Q