3v4l.org

run code in 300+ PHP versions simultaneously
<?php function showCombinations($traits, $string = '', $i = 0) { if ($i >= count($traits)) return trim($string) . "\n"; else { foreach ($traits[$i] as $trait) return showCombinations("$string $trait", $traits, $i + 1); } } $traits = array ( array('Happy', 'Sad', 'Angry', 'Hopeful'), array('Outgoing', 'Introverted'), array('Tall', 'Short', 'Medium'), array('Handsome', 'Plain', 'Ugly') ); $combinations = getCombinations($traits); echo $combinations;

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.0000.01418.43
8.3.50.0110.00721.20
8.3.40.0070.00718.80
8.3.30.0140.00719.93
8.3.20.0000.00820.48
8.3.10.0040.00421.08
8.3.00.0050.00223.66
8.2.180.0110.00716.50
8.2.170.0090.00922.96
8.2.160.0100.00320.35
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0070.00026.16
8.2.120.0070.00020.95
8.2.110.0000.01019.38
8.2.100.0110.00017.72
8.2.90.0040.00719.05
8.2.80.0050.00317.97
8.2.70.0060.00317.50
8.2.60.0080.00017.80
8.2.50.0070.00318.07
8.2.40.0030.00518.09
8.2.30.0030.00719.31
8.2.20.0040.00417.59
8.2.10.0030.00517.64
8.2.00.0040.00417.73
8.1.280.0110.00425.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0060.00321.25
8.1.230.0000.01117.42
8.1.220.0080.00017.74
8.1.210.0000.00818.77
8.1.200.0060.00317.36
8.1.190.0080.00017.23
8.1.180.0030.00718.10
8.1.170.0040.00418.55
8.1.160.0070.00018.82
8.1.150.0000.00818.57
8.1.140.0070.00317.41
8.1.130.0000.00717.84
8.1.120.0030.00517.44
8.1.110.0070.00017.43
8.1.100.0050.00217.30
8.1.90.0000.00717.38
8.1.80.0000.00717.41
8.1.70.0000.00717.35
8.1.60.0070.00317.50
8.1.50.0020.00517.46
8.1.40.0040.00817.40
8.1.30.0050.00217.50
8.1.20.0040.00417.67
8.1.10.0080.00017.48
8.1.00.0050.00317.43
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0000.00718.43
8.0.270.0070.00017.13
8.0.260.0000.00716.79
8.0.250.0080.00016.94
8.0.240.0030.00616.89
8.0.230.0000.00817.01
8.0.220.0060.00316.91
8.0.210.0040.00416.89
8.0.200.0030.00316.84
8.0.190.0000.00716.90
8.0.180.0030.00316.93
8.0.170.0000.00716.94
8.0.160.0000.00716.92
8.0.150.0030.00316.83
8.0.140.0080.00016.81
8.0.130.0030.00313.27
8.0.120.0040.00416.74
8.0.110.0000.00816.74
8.0.100.0030.00316.71
8.0.90.0000.00716.78
8.0.80.0060.01016.84
8.0.70.0000.00716.87
8.0.60.0080.00016.96
8.0.50.0000.00816.93
8.0.30.0070.01116.95
8.0.20.0090.00917.40
8.0.10.0000.00716.92
8.0.00.0100.00816.50
7.4.330.0000.00516.78
7.4.320.0060.00016.39
7.4.300.0030.00316.43
7.4.290.0050.00316.48
7.4.280.0000.00716.54
7.4.270.0070.00016.52
7.4.260.0030.00313.31
7.4.250.0030.00616.51
7.4.240.0080.00016.61
7.4.230.0000.00716.60
7.4.220.0160.00316.61
7.4.210.0100.00816.54
7.4.200.0070.00016.34
7.4.190.0000.00816.63
7.4.160.0030.01316.56
7.4.150.0060.01117.40
7.4.140.0090.01117.86
7.4.130.0090.00816.62
7.4.120.0120.00416.61
7.4.110.0040.01816.50
7.4.100.0110.00516.59
7.4.90.0060.01316.60
7.4.80.0080.00819.39
7.4.70.0100.00616.67
7.4.60.0160.00016.35
7.4.50.0000.00916.52
7.4.40.0090.00322.77
7.4.30.0100.00716.35
7.4.00.0070.01014.63
7.3.330.0000.00513.16
7.3.320.0000.00513.15
7.3.310.0030.00316.19
7.3.300.0000.00716.30
7.3.290.0070.00716.30
7.3.280.0080.00916.35
7.3.270.0090.00917.40
7.3.260.0110.00918.24
7.3.250.0050.01216.35
7.3.240.0080.01216.50
7.3.230.0070.01016.55
7.3.210.0120.00616.21
7.3.200.0160.00019.39
7.3.190.0090.01216.35
7.3.180.0080.00916.40
7.3.170.0040.01916.30
7.3.160.0080.00816.27
7.3.120.0050.01114.87
7.3.110.0110.00714.66
7.3.100.0070.00714.78
7.3.90.0090.00014.90
7.3.80.0160.00014.96
7.3.70.0130.00314.64
7.3.60.0070.01014.88
7.3.50.0040.01114.82
7.3.40.0030.01314.87
7.3.30.0070.00714.88
7.3.20.0110.00316.41
7.3.10.0000.01016.54
7.3.00.0000.01716.57
7.2.330.0070.01116.50
7.2.320.0120.00916.57
7.2.310.0170.00016.39
7.2.300.0060.01016.45
7.2.290.0060.01016.37
7.2.250.0060.01315.01
7.2.240.0040.01514.77
7.2.230.0030.01014.93
7.2.220.0030.01014.95
7.2.210.0070.01015.09
7.2.200.0060.00614.84
7.2.190.0060.00614.75
7.2.180.0040.01115.00
7.2.170.0060.00914.90
7.2.60.0070.01016.88
7.2.00.0030.01019.16
7.1.330.0090.00915.52
7.1.320.0030.01015.55
7.1.310.0120.00315.58
7.1.300.0000.01515.52
7.1.290.0070.00715.47
7.1.280.0030.01315.39
7.1.270.0070.00715.57
7.1.260.0030.00715.42
7.1.200.0080.00415.47
7.1.70.0000.00816.69
7.1.60.0030.00717.18
7.1.50.0060.01516.96
7.1.00.0070.03022.30
7.0.200.0000.01016.57
7.0.140.0030.07322.10
7.0.100.0070.08019.94
7.0.90.0030.05320.14
7.0.80.0030.08719.98
7.0.70.0100.08320.00
7.0.60.0070.08319.79
7.0.50.0500.06720.32
7.0.40.0230.06020.09
7.0.30.0070.07020.19
7.0.20.0170.07020.15
7.0.10.0070.08319.94
7.0.00.0070.09020.14
5.6.280.0030.07020.78
5.6.250.0070.08020.57
5.6.240.0130.07720.55
5.6.230.0070.06020.60
5.6.220.0070.08020.66
5.6.210.0100.08720.56
5.6.200.0070.08721.04
5.6.190.0100.07320.94
5.6.180.0030.04321.04
5.6.170.0170.08021.04
5.6.160.0070.08721.07
5.6.150.0000.09320.94
5.6.140.0130.07721.06
5.6.130.0100.08721.02
5.6.120.0130.08021.18
5.6.110.0100.08021.17
5.6.100.0070.08021.04
5.6.90.0130.07320.93
5.6.80.0170.07020.38
5.6.70.0100.07020.49
5.6.60.0130.07320.47
5.6.50.0070.08720.48
5.6.40.0070.08020.32
5.6.30.0130.08320.41
5.6.20.0170.04020.46
5.6.10.0100.05320.43
5.6.00.0100.08020.46
5.5.380.0130.07320.43
5.5.370.0030.08720.52
5.5.360.0100.08020.39
5.5.350.0100.07720.43
5.5.340.0100.08320.65
5.5.330.0030.08320.92
5.5.320.0030.05720.65
5.5.310.0100.08020.91
5.5.300.0170.07720.88
5.5.290.0130.05720.88
5.5.280.0100.08320.89
5.5.270.0070.08720.63
5.5.260.0070.08020.73
5.5.250.0030.09020.68
5.5.240.0070.04320.21
5.5.230.0030.08020.28
5.5.220.0100.05020.21
5.5.210.0100.07020.31
5.5.200.0030.08320.26
5.5.190.0100.07020.16
5.5.180.0130.04020.22
5.5.160.0030.04720.23
5.5.150.0070.06320.15
5.5.140.0030.08020.25
5.5.130.0030.04720.14
5.5.120.0000.08720.25
5.5.110.0030.08320.25
5.5.100.0070.08320.11
5.5.90.0000.06020.16
5.5.80.0170.06020.08
5.5.70.0070.08020.13
5.5.60.0100.07319.95
5.5.50.0170.06720.15
5.5.40.0030.06319.96
5.5.30.0130.06720.05
5.5.20.0070.05320.05
5.5.10.0070.07720.10
5.5.00.0070.08020.12
5.4.450.0200.05319.29
5.4.440.0130.07019.51
5.4.430.0000.07719.53
5.4.420.0130.06719.41
5.4.410.0030.08019.23
5.4.400.0170.07319.04
5.4.390.0070.05019.14
5.4.380.0100.04318.96
5.4.370.0070.07719.18
5.4.360.0130.06719.24
5.4.350.0100.07318.85
5.4.340.0070.06719.07
5.4.320.0070.08319.16
5.4.310.0070.06319.04
5.4.300.0100.07019.05
5.4.290.0070.04718.88
5.4.280.0070.07018.87
5.4.270.0130.06018.84
5.4.260.0100.05019.21
5.4.250.0030.07719.13
5.4.240.0030.07719.20
5.4.230.0130.06319.02
5.4.220.0030.05719.07
5.4.210.0030.08019.02
5.4.200.0070.06319.16
5.4.190.0030.07319.04
5.4.180.0130.04319.11
5.4.170.0100.07318.87
5.4.160.0130.06319.13
5.4.150.0070.06019.12
5.4.140.0170.06716.43
5.4.130.0000.04716.44
5.4.120.0100.07316.46
5.4.110.0130.07016.34
5.4.100.0030.07316.36
5.4.90.0000.08316.41
5.4.80.0070.07316.46
5.4.70.0100.07316.50
5.4.60.0130.04016.49
5.4.50.0100.07016.37
5.4.40.0070.07016.37
5.4.30.0030.04016.31
5.4.20.0030.07716.36
5.4.10.0130.07316.48
5.4.00.0130.07015.91
5.3.290.0100.06714.72
5.3.280.0070.06014.62
5.3.270.0130.04014.72
5.3.260.0030.07714.58
5.3.250.0030.07714.58
5.3.240.0030.07714.69
5.3.230.0070.07014.58
5.3.220.0030.07714.49
5.3.210.0100.07314.60
5.3.200.0130.07014.63
5.3.190.0070.07714.58
5.3.180.0130.06714.70
5.3.170.0130.06014.67
5.3.160.0070.07014.62
5.3.150.0000.08014.66
5.3.140.0100.07714.49
5.3.130.0070.04014.57
5.3.120.0100.08014.61
5.3.110.0100.07714.47
5.3.100.0070.06313.97
5.3.90.0070.07314.02
5.3.80.0070.06014.09
5.3.70.0000.07314.02
5.3.60.0170.06014.13
5.3.50.0100.06313.97
5.3.40.0000.07714.06
5.3.30.0070.04314.00
5.3.20.0130.06313.75
5.3.10.0070.06713.72
5.3.00.0030.06313.66
5.2.170.0030.05311.20
5.2.160.0100.05711.25
5.2.150.0100.05711.21
5.2.140.0030.06011.20
5.2.130.0130.05311.24
5.2.120.0000.04011.02
5.2.110.0030.05011.16
5.2.100.0100.06311.23
5.2.90.0030.05711.04
5.2.80.0100.05311.03
5.2.70.0070.06011.22
5.2.60.0030.06711.12
5.2.50.0100.05311.07
5.2.40.0030.06011.14
5.2.30.0070.06010.98
5.2.20.0000.06711.10
5.2.10.0100.05710.91
5.2.00.0070.05710.79
5.1.60.0100.05010.09
5.1.50.0100.04710.06
5.1.40.0130.02310.07
5.1.30.0030.04010.43
5.1.20.0030.04710.31
5.1.10.0030.05710.11
5.1.00.0100.05010.06
5.0.50.0030.0479.30
5.0.40.0000.0479.30
5.0.30.0030.0609.30
5.0.20.0000.0309.30
5.0.10.0030.0409.30
5.0.00.0030.0679.30
4.4.90.0070.0279.30
4.4.80.0000.0379.30
4.4.70.0070.0339.30
4.4.60.0000.0339.30
4.4.50.0000.0379.30
4.4.40.0100.0439.30
4.4.30.0030.0379.30
4.4.20.0070.0179.30
4.4.10.0000.0379.30
4.4.00.0030.0539.30
4.3.110.0030.0339.30
4.3.100.0030.0339.30
4.3.90.0070.0309.30
4.3.80.0000.0539.30
4.3.70.0000.0379.30
4.3.60.0100.0239.30
4.3.50.0030.0279.30
4.3.40.0000.0509.30
4.3.30.0100.0279.30
4.3.20.0000.0409.30
4.3.10.0030.0339.30
4.3.00.0030.0339.30

preferences:
49.25 ms | 401 KiB | 5 Q