3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getCombinations($traits, $string = '', $i = 0) { if ($i >= count($traits)) return trim($string) . "\n"; else { foreach ($traits[$i] as $trait) return showCombinations($traits, "$string $trait", $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.40.0060.01218.60
8.3.30.0000.01420.36
8.3.20.0060.00320.71
8.3.10.0050.00321.04
8.3.00.0050.00323.41
8.2.170.0150.00022.96
8.2.160.0100.00320.39
8.2.150.0070.00024.18
8.2.140.0070.00024.66
8.2.130.0070.00026.16
8.2.120.0000.00721.11
8.2.110.0060.00319.16
8.2.100.0060.00618.03
8.2.90.0080.00319.34
8.2.80.0000.00817.97
8.2.70.0080.00017.72
8.2.60.0000.00917.93
8.2.50.0030.01018.07
8.2.40.0050.00318.34
8.2.30.0040.00419.31
8.2.20.0000.00717.66
8.2.10.0070.00017.68
8.2.00.0000.00717.71
8.1.270.0000.00823.99
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0060.00321.49
8.1.230.0000.01217.58
8.1.220.0030.00617.74
8.1.210.0060.00318.77
8.1.200.0030.00617.47
8.1.190.0000.00917.35
8.1.180.0000.00818.10
8.1.170.0040.00418.27
8.1.160.0000.00718.84
8.1.150.0040.00418.57
8.1.140.0040.00417.32
8.1.130.0000.00717.70
8.1.120.0000.00817.48
8.1.110.0000.00717.49
8.1.100.0000.00717.44
8.1.90.0040.00417.34
8.1.80.0000.00717.43
8.1.70.0070.00017.47
8.1.60.0000.00917.59
8.1.50.0050.00217.37
8.1.40.0060.00317.54
8.1.30.0060.00317.63
8.1.20.0030.00617.61
8.1.10.0000.00817.49
8.1.00.0070.00017.39
8.0.300.0040.00418.77
8.0.290.0050.00316.75
8.0.280.0030.00518.43
8.0.270.0040.00417.30
8.0.260.0030.00316.94
8.0.250.0000.00717.02
8.0.240.0000.00817.02
8.0.230.0000.00717.08
8.0.220.0030.00616.97
8.0.210.0000.00716.98
8.0.200.0060.00016.89
8.0.190.0050.00317.00
8.0.180.0000.00816.95
8.0.170.0040.00416.90
8.0.160.0030.00316.82
8.0.150.0030.00516.94
8.0.140.0040.00416.89
8.0.130.0030.00313.39
8.0.120.0070.00016.94
8.0.110.0030.00516.82
8.0.100.0070.00017.02
8.0.90.0050.00216.88
8.0.80.0070.01416.88
8.0.70.0040.00417.02
8.0.60.0000.00717.00
8.0.50.0000.00716.98
8.0.30.0100.00917.17
8.0.20.0120.00617.40
8.0.10.0030.00516.91
8.0.00.0090.00916.81
7.4.330.0030.00316.88
7.4.320.0030.00316.58
7.4.300.0000.00616.48
7.4.290.0070.00016.51
7.4.280.0040.00416.60
7.4.270.0030.00316.48
7.4.260.0000.00613.27
7.4.250.0040.00416.43
7.4.240.0000.00716.43
7.4.230.0050.00216.71
7.4.220.0120.00616.50
7.4.210.0060.00916.64
7.4.200.0070.00016.58
7.4.190.0070.00016.66
7.4.160.0030.01316.53
7.4.150.0070.01017.40
7.4.140.0050.01217.86
7.4.130.0070.01116.57
7.4.120.0100.00616.40
7.4.110.0090.01316.60
7.4.100.0100.00616.66
7.4.90.0150.00316.56
7.4.80.0030.01319.39
7.4.70.0000.01716.50
7.4.60.0130.00716.50
7.4.50.0000.00816.57
7.4.40.0030.01222.77
7.4.30.0120.00616.66
7.4.10.0080.00815.11
7.4.00.0070.01014.93
7.3.330.0000.00513.20
7.3.320.0020.00213.37
7.3.310.0050.00316.38
7.3.300.0070.00016.22
7.3.290.0140.00016.35
7.3.280.0130.00316.34
7.3.270.0060.01117.40
7.3.260.0080.01018.24
7.3.250.0070.01016.38
7.3.240.0090.00916.39
7.3.230.0120.00616.55
7.3.210.0070.01016.52
7.3.200.0080.01519.39
7.3.190.0030.01416.62
7.3.180.0130.00316.70
7.3.170.0080.00916.57
7.3.160.0140.00316.51
7.3.130.0050.01414.87
7.3.120.0090.00714.87
7.3.110.0080.00915.02
7.3.100.0020.01314.83
7.3.90.0060.00914.87
7.3.80.0100.00714.78
7.3.70.0040.00814.75
7.3.60.0060.00614.89
7.3.50.0110.00314.78
7.3.40.0030.00914.88
7.3.30.0040.00914.81
7.3.20.0060.00616.66
7.3.10.0080.00616.52
7.3.00.0050.00716.64
7.2.330.0060.01216.68
7.2.320.0140.01016.74
7.2.310.0090.00916.85
7.2.300.0130.00316.79
7.2.290.0090.00816.47
7.2.260.0060.01114.99
7.2.250.0080.00915.20
7.2.240.0040.01114.93
7.2.230.0080.00714.90
7.2.220.0080.00714.95
7.2.210.0070.00714.91
7.2.200.0040.00915.06
7.2.190.0090.00814.99
7.2.180.0050.00814.99
7.2.170.0040.00814.95
7.2.160.0050.01015.01
7.2.150.0080.00316.99
7.2.140.0060.00816.87
7.2.130.0040.00916.95
7.2.120.0100.00516.98
7.2.110.0070.00716.93
7.2.100.0050.00616.58
7.2.90.0080.00617.06
7.2.80.0050.00716.84
7.2.70.0030.01216.92
7.2.60.0060.00616.91
7.2.50.0050.00717.09
7.2.40.0060.00817.03
7.2.30.0060.00716.99
7.2.20.0070.00816.96
7.2.10.0090.00716.93
7.2.00.0020.01117.44
7.1.330.0040.00915.88
7.1.320.0050.01315.77
7.1.310.0070.00615.83
7.1.300.0070.00615.83
7.1.290.0060.00515.79
7.1.280.0070.00615.74
7.1.270.0020.01115.79
7.1.260.0040.00815.72
7.1.250.0090.00315.69
7.1.240.0040.01115.89
7.1.230.0030.00815.85
7.1.220.0040.00815.55
7.1.210.0010.01015.79
7.1.200.0090.00315.75
7.1.190.0040.00515.73
7.1.180.0030.00815.61
7.1.170.0060.00615.63
7.1.160.0070.00615.81
7.1.150.0090.00315.75
7.1.140.0070.00515.85
7.1.130.0100.00515.94
7.1.120.0050.01015.63
7.1.110.0060.00615.92
7.1.100.0070.00616.60
7.1.90.0090.00515.82
7.1.80.0030.01215.69
7.1.70.0060.00816.17
7.1.60.0070.00916.97
7.1.50.0060.00916.21
7.1.40.0090.00215.68
7.1.30.0090.00415.93
7.1.20.0070.00715.73
7.1.10.0060.00615.71
7.1.00.0060.02218.01
7.0.330.0000.01115.33
7.0.320.0000.01315.50
7.0.310.0050.00915.33
7.0.300.0090.00415.51
7.0.290.0040.00715.49
7.0.280.0040.00515.30
7.0.270.0080.00715.35
7.0.260.0060.00515.45
7.0.250.0030.00715.54
7.0.240.0080.00515.50
7.0.230.0060.00815.40
7.0.220.0110.00415.27
7.0.210.0110.00515.35
7.0.200.0020.00915.95
7.0.190.0080.00715.51
7.0.180.0060.00515.36
7.0.170.0070.00615.46
7.0.160.0050.00715.36
7.0.150.0080.00115.34
7.0.140.0030.03117.72
7.0.130.0030.00815.41
7.0.120.0020.01015.58
7.0.110.0050.01015.36
7.0.100.0070.00415.60
7.0.90.0030.00815.45
7.0.80.0040.00715.42
7.0.70.0050.00515.41
7.0.60.0070.03516.98
7.0.50.0070.01816.31
7.0.40.0030.02115.65
7.0.30.0250.02815.71
7.0.20.0150.01915.80
7.0.10.0120.02015.64
7.0.00.0100.03015.73
5.6.400.0050.00914.75
5.6.390.0070.00614.33
5.6.380.0060.00614.44
5.6.370.0070.00914.46
5.6.360.0070.00514.28
5.6.350.0050.01014.35
5.6.340.0110.00314.46
5.6.330.0070.00914.38
5.6.320.0020.01114.27
5.6.310.0100.00714.24
5.6.300.0040.00714.55
5.6.290.0080.00714.34
5.6.280.0040.02916.65
5.6.270.0060.01014.45
5.6.260.0000.01514.43
5.6.250.0050.00714.50
5.6.240.0020.01214.29
5.6.230.0030.00914.35
5.6.220.0050.00514.39
5.6.210.0070.03416.35
5.6.200.0060.02915.58
5.6.190.0060.02416.50
5.6.180.0170.02616.41
5.6.170.0080.01916.48
5.6.160.0070.02316.22
5.6.150.0060.03415.66
5.6.140.0060.03415.62
5.6.130.0070.01715.65
5.6.120.0070.03416.57
5.6.110.0030.02116.53
5.6.100.0100.03116.65
5.6.90.0040.02016.68
5.6.80.0080.01616.52
5.6.70.0160.02816.31
5.6.60.0040.00414.37
5.6.50.0070.00414.35
5.6.40.0060.00614.38
5.6.30.0050.01014.23
5.6.20.0110.00414.40
5.6.10.0030.01014.36
5.6.00.0070.00514.55
5.5.380.0060.00614.18
5.5.370.0070.00614.45
5.5.360.0070.00514.43
5.5.350.0090.01616.36
5.5.340.0080.03115.43
5.5.330.0090.01516.33
5.5.320.0110.02316.10
5.5.310.0140.02616.38
5.5.300.0080.03315.55
5.5.290.0050.02915.60
5.5.280.0040.03716.43
5.5.270.0080.02516.42
5.5.260.0000.03216.39
5.5.250.0090.03116.35
5.5.240.0070.03016.36
5.5.230.0080.00514.29
5.5.220.0030.00614.28
5.5.210.0050.00814.22
5.5.200.0080.00314.34
5.5.190.0050.00814.09
5.5.180.0010.01114.37
5.5.170.0050.00714.23
5.5.160.0050.00814.17
5.5.150.0090.00214.12
5.5.140.0060.00914.36
5.5.130.0070.00714.13
5.5.120.0040.00814.30
5.5.110.0040.00614.09
5.5.100.0030.01014.31
5.5.90.0070.00514.29
5.5.80.0070.00714.20
5.5.70.0110.00414.23
5.5.60.0060.01014.26
5.5.50.0060.00614.18
5.5.40.0070.00714.36
5.5.30.0110.00514.00
5.5.20.0010.01014.24
5.5.10.0070.00314.02
5.5.00.0000.01214.32
5.4.450.0030.03114.28
5.4.440.0050.01714.40
5.4.430.0060.02214.22
5.4.420.0060.02914.34
5.4.410.0040.03014.20
5.4.400.0060.03214.19
5.4.390.0050.03114.09
5.4.380.0070.02914.24
5.4.370.0100.01814.30
5.4.360.0080.02214.18
5.4.350.0090.02314.17
5.4.340.0070.02914.19
5.4.330.0060.00111.60
5.4.320.0040.02814.09
5.4.310.0060.02814.24
5.4.300.0030.02414.26
5.4.290.0040.02814.26
5.4.280.0030.02114.12
5.4.270.0080.01614.21
5.4.260.0070.02814.20
5.4.250.0020.02214.21
5.4.240.0030.01814.22
5.4.230.0040.02314.18
5.4.220.0040.02414.20
5.4.210.0060.01814.07
5.4.200.0040.01914.21
5.4.190.0080.01714.10
5.4.180.0100.01414.13
5.4.170.0030.01814.06
5.4.160.0060.01814.27
5.4.150.0080.01514.20
5.4.140.0110.01413.28
5.4.130.0030.01813.26
5.4.120.0050.01513.21
5.4.110.0070.01613.39
5.4.100.0100.01313.24
5.4.90.0080.01513.23
5.4.80.0030.01713.26
5.4.70.0090.01113.39
5.4.60.0120.01313.36
5.4.50.0100.01313.30
5.4.40.0050.01713.24
5.4.30.0100.01613.22
5.4.20.0080.01413.28
5.4.10.0100.01613.34
5.4.00.0070.01613.10
5.3.290.0030.02712.60
5.3.280.0080.02712.58
5.3.270.0080.02112.56
5.3.260.0030.01912.61
5.3.250.0080.01512.56
5.3.240.0080.01212.55
5.3.230.0090.01412.58
5.3.220.0070.01612.55
5.3.210.0100.01312.57
5.3.200.0070.01612.65
5.3.190.0080.01912.55
5.3.180.0110.01212.62
5.3.170.0050.01812.60
5.3.160.0080.01912.58
5.3.150.0070.01712.58
5.3.140.0080.01412.58
5.3.130.0080.01612.59
5.3.120.0070.01612.62
5.3.110.0060.01612.59
5.3.100.0080.01612.37
5.3.90.0040.01812.42
5.3.80.0110.01112.37
5.3.70.0050.01712.35
5.3.60.0100.01212.42
5.3.50.0090.01312.40
5.3.40.0080.01912.43
5.3.30.0080.01412.40
5.3.20.0040.02112.29
5.3.10.0070.02712.30
5.3.00.0100.02512.24
5.2.170.0100.02712.16
5.2.160.0100.03012.16
5.2.150.0100.02712.16
5.2.140.0130.02312.16
5.2.130.0030.02312.16
5.2.120.0000.03012.16
5.2.110.0070.04012.16
5.2.100.0130.06012.16
5.2.90.0130.04012.16
5.2.80.0070.03712.16
5.2.70.0070.03712.16
5.2.60.0030.06712.16
5.2.50.0100.05312.16
5.2.40.0030.06012.16
5.2.30.0030.06312.16
5.2.20.0000.06312.16
5.2.10.0030.05012.16
5.2.00.0070.05012.16
5.1.60.0030.05712.16
5.1.50.0070.04012.16
5.1.40.0070.05312.16
5.1.30.0030.05312.16
5.1.20.0030.04712.16
5.1.10.0000.04012.16
5.1.00.0070.05312.16
5.0.50.0030.04712.16
5.0.40.0030.04712.16
5.0.30.0030.06012.16
5.0.20.0000.03312.16
5.0.10.0030.04712.16
5.0.00.0000.06312.16
4.4.90.0030.02012.16
4.4.80.0030.03012.16
4.4.70.0000.03712.16
4.4.60.0070.02312.16
4.4.50.0070.03012.16
4.4.40.0000.04312.16
4.4.30.0000.03312.16
4.4.20.0000.03312.16
4.4.10.0000.03712.16
4.4.00.0030.05312.16
4.3.110.0030.03712.16
4.3.100.0030.03312.16
4.3.90.0000.03712.16
4.3.80.0000.05312.16
4.3.70.0030.02712.16
4.3.60.0030.03012.16
4.3.50.0030.03312.16
4.3.40.0000.04012.16
4.3.30.0000.02312.16
4.3.20.0030.02312.16
4.3.10.0030.03312.16
4.3.00.0000.03312.16

preferences:
46.5 ms | 400 KiB | 5 Q