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){ if(is_array($array)) { foreach($array as $value) { makeCombinations($value); } } 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.70.0070.01118.55
8.3.60.0150.00618.40
8.3.50.0130.00521.14
8.3.40.0040.01118.83
8.3.30.0110.00618.80
8.3.20.0110.00720.16
8.3.10.0040.00421.92
8.3.00.0040.00422.43
8.2.190.0150.00416.58
8.2.180.0120.00316.63
8.2.170.0070.00722.96
8.2.160.0150.00019.24
8.2.150.0060.01224.18
8.2.140.0080.00024.66
8.2.130.0040.01226.16
8.2.120.0060.00319.79
8.2.110.0000.00922.11
8.2.100.0040.00819.05
8.2.90.0030.00619.35
8.2.80.0000.00717.97
8.2.70.0030.00617.63
8.2.60.0030.00717.93
8.2.50.0000.00818.07
8.2.40.0030.00618.28
8.2.30.0070.00318.05
8.2.20.0020.00517.66
8.2.10.0000.00717.68
8.2.00.0070.00017.65
8.1.280.0130.00725.92
8.1.270.0080.00018.68
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0030.00623.92
8.1.230.0070.00418.97
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0030.00617.36
8.1.190.0040.00417.30
8.1.180.0000.00820.39
8.1.170.0040.00418.57
8.1.160.0070.00022.06
8.1.150.0050.00518.68
8.1.140.0040.00417.32
8.1.130.0000.00717.83
8.1.120.0040.00317.47
8.1.110.0070.00017.32
8.1.100.0030.00317.36
8.1.90.0000.00717.35
8.1.80.0000.00717.42
8.1.70.0070.00017.47
8.1.60.0030.00617.55
8.1.50.0000.00817.56
8.1.40.0060.00317.41
8.1.30.0060.00317.52
8.1.20.0040.00417.48
8.1.10.0000.00717.52
8.1.00.0030.00617.32
8.0.300.0050.00218.77
8.0.290.0000.00717.05
8.0.280.0000.00718.30
8.0.270.0030.00317.30
8.0.260.0060.00018.35
8.0.250.0000.00717.01
8.0.240.0030.00717.00
8.0.230.0000.00717.03
8.0.220.0030.00316.82
8.0.210.0030.00316.93
8.0.200.0060.00016.92
8.0.190.0000.00817.01
8.0.180.0050.00317.00
8.0.170.0040.00417.00
8.0.160.0040.00416.93
8.0.150.0030.00316.89
8.0.140.0030.00316.80
8.0.130.0030.00313.37
8.0.120.0070.00016.97
8.0.110.0040.00416.87
8.0.100.0000.00716.82
8.0.90.0000.00716.75
8.0.80.0100.01016.90
8.0.70.0040.00416.95
8.0.60.0000.00716.85
8.0.50.0040.00416.77
8.0.30.0050.01317.14
8.0.20.0140.00717.40
8.0.10.0040.00416.96
8.0.00.0070.01016.65
7.4.330.0000.00415.00
7.4.320.0030.00516.40
7.4.300.0000.00716.54
7.4.290.0000.00616.52
7.4.280.0000.00716.55
7.4.270.0000.00616.61
7.4.260.0030.00316.52
7.4.250.0000.00816.45
7.4.240.0040.00316.56
7.4.230.0030.00316.49
7.4.220.0100.00716.70
7.4.210.0110.00716.60
7.4.200.0040.00416.68
7.4.190.0080.00016.62
7.4.160.0060.00916.59
7.4.150.0150.00317.40
7.4.140.0080.01117.86
7.4.130.0090.01016.65
7.4.120.0110.00816.53
7.4.110.0140.00316.64
7.4.100.0090.00916.59
7.4.90.0100.00616.48
7.4.80.0100.00619.39
7.4.70.0100.01316.30
7.4.60.0090.00616.55
7.4.50.0040.00416.39
7.4.40.0040.01222.77
7.4.30.0100.00716.59
7.4.00.0100.00314.77
7.3.330.0000.00613.43
7.3.320.0000.00613.27
7.3.310.0040.00416.38
7.3.300.0070.00016.43
7.3.290.0000.01416.34
7.3.280.0100.00516.38
7.3.270.0070.01017.40
7.3.260.0100.00716.31
7.3.250.0080.01016.50
7.3.240.0060.01116.58
7.3.230.0090.00916.40
7.3.210.0140.01016.30
7.3.200.0120.00619.39
7.3.190.0040.01416.35
7.3.180.0040.01116.34
7.3.170.0080.01516.59
7.3.160.0030.01416.38
7.3.120.0100.00314.66
7.3.10.0070.00716.69
7.3.00.0080.00516.38
7.2.330.0060.01216.61
7.2.320.0100.00716.67
7.2.310.0090.00916.80
7.2.300.0090.01216.51
7.2.290.0120.00316.48
7.2.130.0000.01616.56
7.2.120.0040.00716.98
7.2.110.0040.01116.70
7.2.100.0060.01116.70
7.2.90.0070.01116.93
7.2.80.0030.01516.82
7.2.70.0060.01016.93
7.2.60.0030.01316.81
7.2.50.0080.00317.12
7.2.40.0080.00416.96
7.2.30.0030.01016.63
7.2.20.0130.00317.02
7.2.10.0070.00717.01
7.2.00.0030.00918.09
7.1.250.0070.00715.88
7.1.240.0100.00316.00
7.1.230.0000.00815.55
7.1.220.0080.00415.78
7.1.210.0030.01015.81
7.1.200.0030.01315.84
7.1.190.0070.00715.64
7.1.180.0120.00315.53
7.1.170.0060.00915.52
7.1.160.0070.00715.58
7.1.150.0040.00415.77
7.1.140.0060.01015.77
7.1.130.0060.01215.66
7.1.120.0120.00015.62
7.1.110.0070.00715.85
7.1.100.0020.00917.09
7.1.90.0000.01415.95
7.1.80.0040.00715.89
7.1.70.0020.00716.37
7.1.60.0050.01017.62
7.1.50.0060.01416.32
7.1.40.0090.00315.67
7.1.30.0000.00715.61
7.1.20.0030.01215.83
7.1.10.0120.00315.44
7.1.00.0030.02218.86
7.0.330.0100.00615.59
7.0.320.0040.00815.10
7.0.310.0030.00614.93
7.0.300.0040.00415.26
7.0.290.0000.01015.25
7.0.280.0090.00415.50
7.0.270.0070.00715.01
7.0.260.0000.01215.28
7.0.250.0030.01015.63
7.0.240.0030.01015.29
7.0.230.0000.00715.49
7.0.220.0040.00815.39
7.0.210.0050.00515.42
7.0.200.0020.01115.95
7.0.190.0060.00615.31
7.0.180.0100.00315.57
7.0.170.0070.00715.55
7.0.160.0060.00315.29
7.0.150.0000.00815.31
7.0.140.0030.04118.56
7.0.130.0040.00415.54
7.0.120.0070.00715.34
7.0.110.0000.01315.35
7.0.100.0060.02417.71
7.0.90.0030.05017.51
7.0.80.0050.04817.54
7.0.70.0130.03717.65
7.0.60.0040.02917.74
7.0.50.0100.04217.92
7.0.40.0100.04516.75
7.0.30.0080.04316.88
7.0.20.0050.04616.76
7.0.10.0080.04016.74
7.0.00.0060.04616.82
5.6.380.0100.00714.57
5.6.370.0070.00714.59
5.6.360.0040.00414.59
5.6.350.0060.00914.57
5.6.340.0070.00314.60
5.6.330.0100.00313.98
5.6.320.0070.01013.91
5.6.310.0070.00714.61
5.6.300.0090.00314.48
5.6.290.0000.01414.12
5.6.280.0050.03917.79
5.6.270.0030.01214.63
5.6.260.0070.00414.42
5.6.250.0020.02817.49
5.6.240.0150.04017.53
5.6.230.0050.03917.53
5.6.220.0110.04117.48
5.6.210.0090.04017.51
5.6.200.0150.04117.60
5.6.190.0100.04117.71
5.6.180.0110.03717.64
5.6.170.0090.04317.71
5.6.160.0100.03617.82
5.6.150.0040.03917.66
5.6.140.0040.04717.71
5.6.130.0080.04217.64
5.6.120.0050.04717.66
5.6.110.0070.04617.71
5.6.100.0090.04617.60
5.6.90.0060.02717.69
5.6.80.0150.02317.38
5.6.70.0090.02817.40
5.6.60.0070.04217.41
5.6.50.0110.03517.41
5.6.40.0060.04317.23
5.6.30.0050.04717.33
5.6.20.0060.04317.35
5.6.10.0030.03117.38
5.6.00.0100.04117.32
5.5.380.0050.03215.75
5.5.370.0060.04315.76
5.5.360.0050.04215.80
5.5.350.0000.04615.74
5.5.340.0090.03715.80
5.5.330.0030.02815.88
5.5.320.0070.04116.02
5.5.310.0060.02916.12
5.5.300.0080.04315.98
5.5.290.0100.03815.89
5.5.280.0100.04215.94
5.5.270.0080.04116.08
5.5.260.0050.04516.16
5.5.250.0090.04115.74
5.5.240.0070.03715.61
5.5.230.0040.02515.52
5.5.220.0070.04415.51
5.5.210.0070.03415.56
5.5.200.0080.04515.66
5.5.190.0080.03115.60
5.5.180.0080.03815.45
5.5.170.0100.00310.93
5.5.160.0030.03915.54
5.5.150.0050.03915.63
5.5.140.0120.02315.65
5.5.130.0090.03815.47
5.5.120.0060.04015.73
5.5.110.0130.03615.74
5.5.100.0040.04515.53
5.5.90.0020.02615.56
5.5.80.0150.03515.45
5.5.70.0050.04515.74
5.5.60.0050.04115.54
5.5.50.0120.03815.54
5.5.40.0100.03315.59
5.5.30.0070.03315.66
5.5.20.0080.02415.47
5.5.10.0110.03315.46
5.5.00.0060.04315.64
5.4.450.0030.04515.30
5.4.440.0020.03415.30
5.4.430.0060.02515.13
5.4.420.0030.03215.35
5.4.410.0080.04115.21
5.4.400.0030.04414.98
5.4.390.0110.01915.07
5.4.380.0070.04014.95
5.4.370.0060.04115.21
5.4.360.0050.03714.89
5.4.350.0070.02415.01
5.4.340.0020.04615.08
5.4.330.0040.00710.91
5.4.320.0070.04014.90
5.4.310.0020.04514.99
5.4.300.0020.04514.97
5.4.290.0070.03514.88
5.4.280.0020.04915.08
5.4.270.0080.03615.10
5.4.260.0060.04115.03
5.4.250.0070.03615.02
5.4.240.0030.04215.10
5.4.230.0070.04015.11
5.4.220.0050.04514.98
5.4.210.0020.04814.89
5.4.200.0030.02715.03
5.4.190.0020.04314.95
5.4.180.0080.04014.99
5.4.170.0020.04214.87
5.4.160.0130.03714.94
5.4.150.0100.03715.01
5.4.140.0020.04213.71
5.4.130.0110.02813.62
5.4.120.0080.03713.71
5.4.110.0100.03513.51
5.4.100.0070.03213.73
5.4.90.0070.03813.73
5.4.80.0070.04113.52
5.4.70.0050.04213.62
5.4.60.0110.03513.65
5.4.50.0080.02013.70
5.4.40.0080.03513.61
5.4.30.0070.03513.67
5.4.20.0070.04013.65
5.4.10.0050.02213.71
5.4.00.0080.03213.42
5.3.290.0000.04112.77
5.3.280.0070.03112.49
5.3.270.0050.04512.71
5.3.260.0050.04312.58
5.3.250.0070.03912.68
5.3.240.0050.02712.62
5.3.230.0050.03812.51
5.3.220.0040.04312.62
5.3.210.0020.04312.50
5.3.200.0050.03812.49
5.3.190.0030.04112.41
5.3.180.0030.04112.65
5.3.170.0030.04512.71
5.3.160.0080.02312.71
5.3.150.0060.03712.69
5.3.140.0050.04212.47
5.3.130.0050.02812.70
5.3.120.0090.02812.46
5.3.110.0020.03112.52
5.3.100.0080.02312.29
5.3.90.0070.03312.44
5.3.80.0020.02612.38
5.3.70.0020.03612.33
5.3.60.0130.03512.11
5.3.50.0080.03212.12
5.3.40.0080.02812.16
5.3.30.0060.03512.16
5.3.20.0060.04012.14
5.3.10.0080.04111.90
5.3.00.0020.03311.96
5.2.170.0030.03510.90
5.2.160.0020.03610.91
5.2.150.0020.02810.92
5.2.140.0050.03610.76
5.2.130.0030.03210.96
5.2.120.0050.02510.89
5.2.110.0020.02510.89
5.2.100.0070.02110.90
5.2.90.0050.02810.90
5.2.80.0050.03210.91
5.2.70.0030.03210.75
5.2.60.0020.03510.75
5.2.50.0030.02510.88
5.2.40.0120.02710.83
5.2.30.0070.03210.84
5.2.20.0050.01810.78
5.2.10.0030.03510.75
5.2.00.0040.02010.75
5.1.60.0040.02910.75
5.1.50.0040.02310.75
5.1.40.0040.02910.75
5.1.30.0060.01510.75
5.1.20.0000.03110.75
5.1.10.0030.02410.75
5.1.00.0060.01210.75
5.0.50.0010.02610.75
5.0.40.0030.02510.75
5.0.30.0050.02110.75
5.0.20.0070.02210.75
5.0.10.0020.02310.75
5.0.00.0020.03210.75
4.4.90.0020.01710.75
4.4.80.0000.01510.75
4.4.70.0000.02110.75
4.4.60.0000.02110.75
4.4.50.0040.01010.75
4.4.40.0020.03110.75
4.4.30.0040.01610.75
4.4.20.0030.01810.75
4.4.10.0020.01610.75
4.4.00.0000.02610.75
4.3.110.0020.02010.75
4.3.100.0050.01610.75
4.3.90.0020.02010.75
4.3.80.0000.02910.75
4.3.70.0010.01910.75
4.3.60.0000.01710.75
4.3.50.0020.01310.75
4.3.40.0050.02610.75
4.3.30.0020.02010.75
4.3.20.0020.02210.75
4.3.10.0030.01710.75
4.3.00.0020.02010.75

preferences:
50.73 ms | 401 KiB | 5 Q