3v4l.org

run code in 300+ PHP versions simultaneously
<?php function generate($elements, $maxvalue) { if ($elements == 0) return array(); $result = array(); foreach (range(1, $maxvalue) as $el) { $result[] = array($el); } foreach (range(1, $maxvalue) as $el) { foreach (generate($elements - 1, $maxvalue) as $arr) { $result[] = array($el, ...$arr); } } return $result; } $combs = generate(3, 3); print_r($combs);

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.4.130.0130.00817.89
8.4.120.0150.00522.23
8.4.110.0050.00418.88
8.4.100.0120.00917.74
8.4.90.0120.00819.65
8.4.80.0050.00322.68
8.4.70.0100.01017.93
8.4.60.0140.00620.52
8.4.50.0130.00818.53
8.4.40.0060.01319.27
8.4.30.0130.00319.98
8.4.20.0060.01617.89
8.4.10.0160.00319.48
8.3.260.0110.01016.61
8.3.250.0110.00819.05
8.3.240.0120.00816.46
8.3.230.0130.00616.52
8.3.220.0110.00717.14
8.3.210.0130.00616.49
8.3.200.0050.00416.94
8.3.190.0080.00619.07
8.3.180.0130.00719.03
8.3.170.0150.00317.17
8.3.160.0030.01417.14
8.3.150.0070.00716.79
8.3.140.0040.00416.53
8.3.130.0040.00416.48
8.3.120.0090.00618.85
8.3.110.0090.00620.94
8.3.100.0060.00324.06
8.3.90.0100.00026.77
8.3.80.0060.00316.50
8.3.70.0150.00018.43
8.3.60.0040.01116.75
8.3.50.0070.01023.66
8.3.40.0080.01222.09
8.3.30.0110.00418.71
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0080.01120.86
8.2.280.0060.01218.47
8.2.270.0040.01516.48
8.2.260.0060.01217.14
8.2.250.0000.00816.68
8.2.240.0030.00617.18
8.2.230.0060.00322.58
8.2.220.0040.00437.54
8.2.210.0060.01226.77
8.2.200.0040.00716.50
8.2.190.0120.00916.63
8.2.180.0030.01425.92
8.2.170.0110.00418.95
8.2.160.0130.00722.96
8.2.150.0000.00825.66
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0000.00821.07
8.2.110.0090.00022.26
8.2.100.0080.00417.84
8.2.90.0050.00317.88
8.2.80.0040.00418.82
8.2.70.0050.00317.63
8.2.60.0000.00818.05
8.2.50.0030.00618.07
8.2.40.0030.00518.35
8.2.30.0050.00218.13
8.2.20.0050.00218.21
8.2.10.0000.00719.21
8.2.00.0050.00219.38
8.1.330.0140.00415.98
8.1.320.0110.00816.30
8.1.310.0180.00016.84
8.1.300.0040.00417.89
8.1.290.0040.00418.88
8.1.280.0070.00725.92
8.1.270.0030.00623.99
8.1.260.0080.00026.35
8.1.250.0050.00328.09
8.1.240.0060.00323.87
8.1.230.0110.00021.04
8.1.220.0000.00717.74
8.1.210.0000.00818.77
8.1.200.0090.00017.23
8.1.190.0030.00617.23
8.1.180.0080.00018.10
8.1.170.0000.00818.75
8.1.160.0040.00418.75
8.1.150.0080.00318.89
8.1.140.0050.00318.90
8.1.130.0070.00017.29
8.1.120.0030.00317.36
8.1.110.0040.00417.46
8.1.100.0020.00517.47
8.1.90.0000.00717.45
8.1.80.0050.00317.47
8.1.70.0040.00417.41
8.1.60.0100.00017.50
8.1.50.0000.00817.42
8.1.40.0000.00817.54
8.1.30.0070.00017.59
8.1.20.0050.00317.56
8.1.10.0070.00317.45
8.1.00.0040.00417.50
8.0.300.0000.00718.77
8.0.290.0080.00016.63
8.0.280.0060.00318.41
8.0.270.0030.00317.87
8.0.260.0030.00316.83
8.0.250.0000.00616.83
8.0.240.0030.00316.91
8.0.230.0040.00416.96
8.0.220.0030.00316.84
8.0.210.0000.00716.80
8.0.200.0030.00316.94
8.0.190.0040.00416.85
8.0.180.0000.00716.91
8.0.170.0050.00316.91
8.0.160.0040.00416.82
8.0.150.0040.00416.87
8.0.140.0000.00716.90
8.0.130.0000.00513.34
8.0.120.0050.00316.80
8.0.110.0040.00416.96
8.0.100.0050.00316.77
8.0.90.0000.00716.90
8.0.80.0100.01016.79
8.0.70.0040.00416.74
8.0.60.0000.00716.77
8.0.50.0030.00516.92
8.0.30.0160.01017.40
8.0.20.0130.00517.09
8.0.10.0040.00416.98
8.0.00.0130.01316.81
7.4.330.0000.00515.55
7.4.320.0060.00016.55
7.4.300.0030.00316.59
7.4.290.0050.00316.36
7.4.280.0050.00216.42
7.4.270.0070.00016.51
7.4.260.0000.00713.30
7.4.250.0050.00516.50
7.4.240.0050.00216.47
7.4.230.0000.00716.59
7.4.220.0020.00516.69
7.4.210.0100.00616.58
7.4.200.0000.00716.57
7.4.130.0160.00516.52
7.4.120.0100.00716.54
7.4.110.0180.00516.54
7.4.100.0150.00616.34
7.4.90.0140.00516.38
7.4.80.0070.01316.34
7.4.70.0130.00616.28
7.4.60.0170.00716.20
7.4.50.0160.00616.45
7.4.40.0080.00816.59
7.4.30.0100.00616.55
7.4.20.0030.01416.44
7.4.10.0100.00716.43
7.4.00.0140.00416.23
7.3.330.0040.00416.00
7.3.320.0000.00513.02
7.3.310.0000.00616.07
7.3.300.0040.00416.20
7.3.290.0060.00816.17
7.3.260.0030.01416.23
7.3.240.0150.00915.79
7.3.230.0030.01516.21
7.3.220.0130.00516.26
7.3.210.0120.00816.17
7.3.200.0080.01116.05
7.3.190.0130.00616.32
7.3.180.0140.00816.19
7.3.170.0130.01116.10
7.3.160.0110.00516.30
7.3.150.0170.00016.11
7.3.140.0060.00916.28
7.3.130.0160.00016.18
7.3.120.0100.00616.28
7.3.110.0170.00016.43
7.3.100.0130.00316.27
7.3.90.0070.01016.27
7.3.80.0130.00316.31
7.3.70.0140.00316.06
7.3.60.0030.01216.14
7.3.50.0070.01016.12
7.3.40.0000.01716.15
7.3.30.0110.01116.21
7.3.20.0110.00816.34
7.3.10.0140.00316.29
7.3.00.0110.00716.23
7.2.340.0110.01116.48
7.2.330.0140.01416.41
7.2.320.0050.01516.46
7.2.310.0140.01116.38
7.2.300.0030.01316.29
7.2.290.0080.00816.22
7.2.280.0120.00616.24
7.2.270.0070.01016.21
7.2.260.0130.00316.20
7.2.250.0130.00316.52
7.2.240.0100.00716.23
7.2.230.0140.00416.61
7.2.220.0100.00616.30
7.2.210.0060.01116.25
7.2.200.0060.01216.20
7.2.190.0100.00716.39
7.2.180.0090.00916.38
7.2.170.0090.00916.20
7.2.160.0100.01216.26
7.2.150.0070.01116.54
7.2.140.0080.01216.25
7.2.130.0120.00616.42
7.2.120.0180.00016.43
7.2.110.0110.00716.44
7.2.100.0070.01016.37
7.2.90.0110.00716.55
7.2.80.0180.00016.37
7.2.70.0000.01716.41
7.2.60.0060.01216.44
7.2.50.0120.00916.43
7.2.40.0090.00916.52
7.2.30.0100.00716.37
7.2.20.0120.00415.99
7.2.10.0040.01416.29
7.2.00.0100.00716.29

preferences:
29.81 ms | 403 KiB | 5 Q