3v4l.org

run code in 300+ PHP versions simultaneously
<?php print_r(ordered_combinations(Array("one", "two", "three", "four"))); function ordered_combinations($array){ if(is_array($array)){ while(count($array) > 0){ foreach($array as $element){ $string = $string . " " . $element; $output[] = $string; } $string = ""; array_shift($array); } return $output; } }

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.01016.75
8.3.60.0110.00416.48
8.3.50.0070.01221.97
8.3.40.0070.00718.79
8.3.30.0040.01118.97
8.3.20.0030.00520.21
8.3.10.0080.00023.51
8.3.00.0060.00320.64
8.2.180.0110.00416.38
8.2.170.0120.00322.96
8.2.160.0070.00722.16
8.2.150.0000.00824.18
8.2.140.0050.00224.66
8.2.130.0030.00526.16
8.2.120.0030.00622.25
8.2.110.0060.00322.25
8.2.100.0080.00417.84
8.2.90.0050.00319.26
8.2.80.0040.00418.05
8.2.70.0060.00317.63
8.2.60.0030.00618.03
8.2.50.0030.00618.07
8.2.40.0000.00718.34
8.2.30.0080.00318.15
8.2.20.0050.00317.81
8.2.10.0000.00817.70
8.2.00.0000.00817.84
8.1.280.0040.01125.92
8.1.270.0060.00323.91
8.1.260.0060.00326.35
8.1.250.0000.00728.09
8.1.240.0030.00623.88
8.1.230.0080.00319.16
8.1.220.0050.00317.79
8.1.210.0000.00818.77
8.1.200.0060.00317.25
8.1.190.0030.00617.39
8.1.180.0030.00518.10
8.1.170.0030.00618.52
8.1.160.0000.00722.02
8.1.150.0070.00018.56
8.1.140.0070.00017.52
8.1.130.0030.00317.74
8.1.120.0070.00017.52
8.1.110.0000.00817.52
8.1.100.0000.00717.45
8.1.90.0000.00717.50
8.1.80.0070.00017.44
8.1.70.0030.00317.40
8.1.60.0060.00317.50
8.1.50.0040.00417.54
8.1.40.0000.00817.45
8.1.30.0000.00817.64
8.1.20.0060.00317.67
8.1.10.0050.00517.53
8.1.00.0000.00817.47
8.0.300.0050.00318.77
8.0.290.0000.00717.30
8.0.280.0000.00718.45
8.0.270.0000.00717.27
8.0.260.0000.00616.74
8.0.250.0050.00316.91
8.0.240.0000.00817.02
8.0.230.0050.00216.96
8.0.220.0030.00316.95
8.0.210.0000.00817.03
8.0.200.0030.00316.99
8.0.190.0040.00417.03
8.0.180.0050.00217.02
8.0.170.0050.00317.00
8.0.160.0000.00716.93
8.0.150.0050.00216.97
8.0.140.0030.00316.89
8.0.130.0030.00313.37
8.0.120.0040.00416.82
8.0.110.0040.00416.87
8.0.100.0000.00717.03
8.0.90.0040.00416.97
8.0.80.0060.01016.93
8.0.70.0000.00816.90
8.0.60.0050.00316.95
8.0.50.0030.00516.84
8.0.30.0060.01216.99
8.0.20.0120.00617.40
8.0.10.0000.00816.95
8.0.00.0110.00816.76
7.4.330.0020.00215.09
7.4.320.0000.00616.52
7.4.300.0060.00016.41
7.4.290.0000.00616.56
7.4.280.0000.00816.55
7.4.270.0000.00716.51
7.4.260.0030.00316.56
7.4.250.0070.00016.57
7.4.240.0010.00616.53
7.4.230.0000.00716.40
7.4.220.0140.01016.50
7.4.210.0050.01016.58
7.4.200.0030.00316.68
7.4.190.0040.00416.65
7.4.160.0040.01316.70
7.4.150.0140.00417.40
7.4.140.0100.00817.86
7.4.130.0060.01016.63
7.4.120.0090.00816.64
7.4.110.0220.00016.39
7.4.100.0060.01216.50
7.4.90.0090.00916.33
7.4.80.0080.00816.58
7.4.70.0110.01116.51
7.4.60.0060.01516.81
7.4.50.0040.00416.63
7.4.40.0000.01322.77
7.4.30.0080.00816.55
7.4.00.0140.00314.77
7.3.330.0030.00313.38
7.3.320.0000.00513.25
7.3.310.0000.00816.27
7.3.300.0000.00716.31
7.3.290.0060.00916.45
7.3.280.0100.00916.34
7.3.270.0060.01217.40
7.3.260.0210.00716.40
7.3.250.0130.00416.50
7.3.240.0070.01016.68
7.3.230.0110.00616.64
7.3.210.0060.01216.52
7.3.200.0110.01219.39
7.3.190.0100.01416.38
7.3.180.0150.00616.51
7.3.170.0110.01116.56
7.3.160.0030.01416.45
7.3.120.0000.01415.16
7.2.330.0180.00016.46
7.2.320.0100.00716.70
7.2.310.0060.01116.45
7.2.300.0060.00916.70
7.2.290.0090.00616.59
7.2.60.0030.01016.54
7.2.50.0070.00717.04
7.1.200.0040.00815.90
7.1.70.0000.00917.15
7.1.60.0160.00719.27
7.1.50.0030.01717.01
7.1.00.0030.07722.45
7.0.200.0120.00316.48
7.0.140.0000.07722.00
7.0.60.0230.08719.96
7.0.50.0000.04317.89
7.0.40.0100.08320.25
7.0.30.0200.05020.06
7.0.20.0170.05020.25
7.0.10.0070.08720.20
7.0.00.0100.08720.10
5.6.280.0070.06721.09
5.6.210.0130.07320.50
5.6.200.0070.08718.16
5.6.190.0170.04020.64
5.6.180.0100.06720.64
5.6.170.0300.06720.48
5.6.160.0070.06020.41
5.6.150.0070.04018.16
5.6.140.0070.05718.21
5.6.130.0100.07718.21
5.6.120.0070.03720.97
5.6.110.0170.07720.99
5.6.100.0000.04720.98
5.6.90.0000.09320.86
5.6.80.0130.07720.36
5.5.350.0230.08020.37
5.5.340.0030.04018.09
5.5.330.0030.09720.37
5.5.320.0270.04320.29
5.5.310.0230.08320.32
5.5.300.0170.06317.98
5.5.290.0100.07718.01
5.5.280.0070.08320.88
5.5.270.0070.06720.80
5.5.260.0230.06320.96
5.5.250.0100.03320.69
5.5.240.0100.08020.19
5.4.450.3370.04019.43
5.4.440.0070.03719.45
5.4.430.0630.04019.25
5.4.420.2570.03719.24
5.4.410.2970.03319.23
5.4.400.3770.04019.16
5.4.390.2870.04019.22
5.4.380.3870.04319.11
5.4.370.3670.03319.16
5.4.360.3630.04019.15
5.4.350.3900.04019.25
5.4.340.3970.03719.16
5.4.320.4370.03319.13
5.4.310.3830.03019.22
5.4.300.4000.03719.20
5.4.290.3670.03319.22
5.4.280.4330.04319.00
5.4.270.3930.03719.17
5.4.260.3870.04019.21
5.4.250.5000.03019.18
5.4.240.3300.04318.96
5.4.230.3700.03719.24
5.4.220.4000.03719.03
5.4.210.3570.04018.95
5.4.200.5570.03719.03
5.4.190.3730.04019.18
5.4.180.3930.03319.02
5.4.170.3830.03019.21
5.4.160.3730.03319.14
5.4.150.3900.04719.08
5.4.140.3970.04016.25
5.4.130.4330.04016.40
5.4.120.3670.03316.39
5.4.110.3770.04016.26
5.4.100.3470.03316.55
5.4.90.3730.03716.48
5.4.80.3800.03016.42
5.4.70.3900.03016.24
5.4.60.3930.03716.21
5.4.50.3930.03316.41
5.4.40.3800.03316.30
5.4.30.3870.04016.19
5.4.20.4070.03316.32
5.4.10.4030.03716.19
5.4.00.4100.03015.75
5.3.290.3970.03314.72
5.3.280.3900.04314.61
5.3.270.3400.04014.60
5.3.260.3900.03714.66
5.3.250.4070.03714.60
5.3.240.3770.04314.66
5.3.230.3630.04014.74
5.3.220.3970.03314.59
5.3.210.3270.04014.59
5.3.200.3230.04714.71
5.3.190.3170.03714.65
5.3.180.3430.04014.57
5.3.170.3470.04014.70
5.3.160.3700.03314.72
5.3.150.3630.03714.59
5.3.140.3770.04014.55
5.3.130.3830.04014.51
5.3.120.3770.02714.55
5.3.110.3900.04014.72
5.3.100.3900.03714.08
5.3.90.3770.04014.09
5.3.80.3670.03314.02
5.3.70.3730.03714.09
5.3.60.4130.03714.06
5.3.50.4100.03013.98
5.3.40.3800.04014.01
5.3.30.4030.03714.07
5.3.20.4000.03713.61
5.3.10.2930.03713.81
5.3.00.3670.03313.56
5.2.170.3170.03011.10
5.2.160.3270.03311.07
5.2.150.3230.03011.18
5.2.140.3370.03011.20
5.2.130.3100.03311.16
5.2.120.2300.02711.14
5.2.110.3070.02711.25
5.2.100.2830.03011.26
5.2.90.2600.03311.14
5.2.80.2970.03011.04
5.2.70.2630.02311.10
5.2.60.2030.02711.12
5.2.50.2070.02311.11
5.2.40.1900.03311.07
5.2.30.2330.03710.97
5.2.20.2270.02310.95
5.2.10.2200.02710.82
5.2.00.2170.02710.86
5.1.60.1430.0309.99
5.1.50.2470.0239.90
5.1.40.2500.02710.02
5.1.30.2700.02710.32
5.1.20.2600.02710.31
5.1.10.2670.02310.09
5.1.00.2670.0279.97
5.0.50.1700.0178.52
5.0.40.1570.0178.41
5.0.30.1800.0338.27
5.0.20.1830.0178.25
5.0.10.1630.0238.21
5.0.00.1500.0308.27
4.4.90.1070.0176.11
4.4.80.0230.0136.11
4.4.70.1230.0136.11
4.4.60.0970.0136.11
4.4.50.1130.0106.11
4.4.40.1130.0276.11
4.4.30.1030.0176.11
4.4.20.1270.0106.11
4.4.10.1300.0176.11
4.4.00.1870.0236.11
4.3.110.1630.0136.11
4.3.100.1430.0176.11
4.3.90.1770.0176.11
4.3.80.1500.0306.11
4.3.70.1330.0176.11
4.3.60.1400.0176.11
4.3.50.1600.0106.13
4.3.40.1470.0276.13
4.3.30.0730.0236.13
4.3.20.1000.0136.13
4.3.10.0670.0206.14
4.3.00.0800.0206.14

preferences:
47.59 ms | 401 KiB | 5 Q