3v4l.org

run code in 300+ PHP versions simultaneously
<?php $set1 = ['A', 'B', 'C']; $set2 = [1, 2, 3]; function perms( $set1, $set2, $i) { $perms = array(); if( $i == count( $set1) - 1) { return array(); } foreach( $set1 as $n1) { foreach( $set2 as $n2) { $perms[] = $n1 . $n2; } } $i++; for( $j = 0; $j < $i; $j++) { $set1[] = array_shift( $set1); $set2[] = array_shift( $set2); } return array_merge( $perms, perms( $set1, $set2)); } var_dump( perms( $set1, $set2, 0));

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.0170.00318.33
8.3.50.0180.00321.27
8.3.40.0140.00018.89
8.3.30.0130.00720.19
8.3.20.0030.00620.70
8.3.10.0040.00421.08
8.3.00.0070.00023.59
8.2.180.0110.00418.38
8.2.170.0070.00722.96
8.2.160.0070.00720.20
8.2.150.0000.00824.18
8.2.140.0030.00624.66
8.2.130.0070.00026.16
8.2.120.0090.00021.05
8.2.110.0040.00419.31
8.2.100.0080.00317.96
8.2.90.0090.00019.17
8.2.80.0050.00218.03
8.2.70.0030.00617.63
8.2.60.0040.00417.91
8.2.50.0050.00318.07
8.2.40.0030.00618.22
8.2.30.0040.00419.37
8.2.20.0000.00817.86
8.2.10.0050.00317.89
8.2.00.0000.00717.81
8.1.280.0100.00725.92
8.1.270.0040.00423.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0110.00020.67
8.1.230.0090.00321.02
8.1.220.0000.00918.77
8.1.210.0040.00418.81
8.1.200.0060.00317.47
8.1.190.0040.00417.53
8.1.180.0000.00918.10
8.1.170.0000.00818.49
8.1.160.0000.00718.84
8.1.150.0040.00418.69
8.1.140.0000.00817.48
8.1.130.0070.00017.81
8.1.120.0040.00417.52
8.1.110.0020.00517.42
8.1.100.0040.00417.51
8.1.90.0000.00717.38
8.1.80.0030.00317.40
8.1.70.0070.00017.45
8.1.60.0050.00317.51
8.1.50.0000.00817.46
8.1.40.0050.00317.45
8.1.30.0000.00817.53
8.1.20.0040.00417.60
8.1.10.0040.00417.49
8.1.00.0080.00017.43
8.0.300.0040.00419.85
8.0.290.0000.00717.02
8.0.280.0000.00718.48
8.0.270.0050.00217.17
8.0.260.0000.00716.88
8.0.250.0070.00017.14
8.0.240.0040.00416.99
8.0.230.0030.00317.11
8.0.220.0000.00716.91
8.0.210.0090.00017.03
8.0.200.0030.00317.05
8.0.190.0020.00517.05
8.0.180.0040.00417.03
8.0.170.0040.00416.88
8.0.160.0050.00317.07
8.0.150.0000.00816.83
8.0.140.0040.00416.86
8.0.130.0030.00313.42
8.0.120.0040.00416.93
8.0.110.0050.00316.93
8.0.100.0070.00016.83
8.0.90.0040.00416.95
8.0.80.0070.00716.98
8.0.70.0030.00517.01
8.0.60.0050.00216.98
8.0.50.0040.00416.96
8.0.30.0070.01217.08
8.0.20.0130.00717.40
8.0.10.0080.00016.89
8.0.00.0020.01516.99
7.4.330.0000.00614.94
7.4.320.0040.00416.43
7.4.300.0000.00616.46
7.4.290.0000.00716.68
7.4.280.0000.00716.57
7.4.270.0030.00316.46
7.4.260.0000.00513.30
7.4.250.0070.00016.48
7.4.240.0030.00316.64
7.4.230.0040.00416.44
7.4.220.0100.00616.67
7.4.210.0030.01316.58
7.4.200.0000.00716.38
7.4.190.0000.00716.49
7.4.160.0120.00316.61
7.4.150.0090.00917.40
7.4.140.0060.01217.86
7.4.130.0110.00716.63
7.4.120.0090.00816.57
7.4.110.0070.01016.52
7.4.100.0070.01016.56
7.4.90.0030.01516.56
7.4.80.0140.00819.39
7.4.70.0130.00416.77
7.4.60.0120.01116.45
7.4.50.0040.00716.26
7.4.40.0000.01322.77
7.4.30.0100.00716.47
7.4.00.0000.01515.21
7.3.330.0060.00013.39
7.3.320.0020.00213.26
7.3.310.0030.00316.46
7.3.300.0070.00016.36
7.3.290.0070.00716.43
7.3.280.0090.00816.40
7.3.270.0090.01317.40
7.3.260.0130.00818.24
7.3.250.0080.00816.53
7.3.240.0090.01516.41
7.3.230.0060.01116.47
7.3.210.0150.00816.66
7.3.200.0120.00619.39
7.3.190.0070.01416.39
7.3.180.0070.01016.57
7.3.170.0060.01116.55
7.3.160.0110.01216.69
7.3.120.0000.01416.90
7.3.110.0080.00616.90
7.3.100.0030.01516.90
7.3.90.0090.00616.90
7.3.80.0000.01416.90
7.3.70.0040.01116.90
7.3.60.0030.01316.90
7.3.50.0030.00516.90
7.3.40.0110.00416.90
7.3.30.0060.00616.90
7.3.20.0050.00516.90
7.3.10.0060.00916.90
7.3.00.0040.01116.90
7.2.330.0090.00916.68
7.2.320.0100.00716.70
7.2.310.0060.01316.37
7.2.300.0170.00716.84
7.2.290.0040.01216.42
7.2.240.0120.00316.90
7.2.230.0060.00916.90
7.2.220.0060.00616.90
7.2.210.0060.00616.90
7.2.200.0070.00716.90
7.2.190.0000.01716.90
7.2.180.0080.00816.90
7.2.170.0070.01016.90
7.2.160.0060.00916.90
7.2.150.0120.00316.90
7.2.140.0030.01316.90
7.2.130.0040.01116.90
7.2.120.0070.01016.90
7.2.110.0070.01016.90
7.2.100.0100.00316.90
7.2.90.0090.00617.08
7.2.80.0130.00016.92
7.2.70.0070.00716.90
7.2.60.0070.00616.72
7.2.50.0030.01017.04
7.2.40.0100.00316.90
7.2.30.0030.00916.90
7.2.20.0030.01016.90
7.2.10.0030.01316.90
7.2.00.0030.01118.26
7.1.330.0040.01116.90
7.1.320.0120.00316.90
7.1.310.0000.01416.90
7.1.300.0030.00916.90
7.1.290.0000.01316.90
7.1.280.0030.00916.90
7.1.270.0070.01016.90
7.1.260.0060.00616.90
7.1.250.0000.01516.90
7.1.200.0050.00315.97
7.1.100.0000.00818.29
7.1.70.0060.01017.38
7.1.60.0120.00919.17
7.1.50.0080.00816.98
7.1.00.0030.03322.45
7.0.200.0050.00516.81
7.0.140.0100.07021.95
7.0.100.0070.08320.95
7.0.90.0100.08020.64
7.0.80.0030.09020.85
7.0.70.0070.08720.59
7.0.60.0070.06720.97
7.0.50.0100.08320.85
7.0.40.0170.07320.00
7.0.30.0070.08720.15
7.0.20.0100.06020.19
7.0.10.0170.07319.95
7.0.00.0170.07720.18
5.6.280.0070.07722.32
5.6.250.0100.04722.43
5.6.240.0070.08322.39
5.6.230.0070.08022.38
5.6.220.0100.07021.51
5.6.210.0100.08022.41
5.6.200.0030.08722.74
5.6.190.0030.05722.80
5.6.180.0070.08322.53
5.6.170.0030.07322.81
5.6.160.0170.08022.33
5.6.150.0100.08321.88
5.6.140.0170.07022.82
5.6.130.0200.07022.24
5.6.120.0000.07022.92
5.6.110.0100.08022.83
5.6.100.0130.07721.74
5.6.90.0230.07022.80
5.6.80.0030.04321.05
5.6.70.0100.08322.09
5.6.60.0070.08021.93
5.6.50.0030.05322.18
5.6.40.0100.08321.25
5.6.30.0030.08722.14
5.6.20.0030.05321.98
5.6.10.0030.09022.09
5.6.00.0130.08322.13
5.5.380.0170.07321.57
5.5.370.0070.08722.01
5.5.360.0130.09022.16
5.5.350.0100.05322.12
5.5.340.0100.09322.67
5.5.330.0130.08022.33
5.5.320.0170.07321.74
5.5.310.0100.08021.75
5.5.300.0100.08322.59
5.5.290.0100.08022.54
5.5.280.0100.07322.38
5.5.270.0030.09722.67
5.5.260.0100.07722.53
5.5.250.0070.05321.39
5.5.240.0100.07322.07
5.5.230.0100.07720.77
5.5.220.0100.08321.80
5.5.210.0170.05321.92
5.5.200.0030.09722.03
5.5.190.0000.05722.00
5.5.180.0100.08022.04
5.5.160.0070.08321.86
5.5.150.0170.07322.00
5.5.140.0070.08021.36
5.5.130.0130.07722.01
5.5.120.0100.07721.83
5.5.110.0170.07321.91
5.5.100.0070.08721.88
5.5.90.0230.05721.93
5.5.80.0030.08721.93
5.5.70.0130.07721.88
5.5.60.0030.07021.81
5.5.50.0100.07720.72
5.5.40.0170.06721.79
5.5.30.0100.06720.55
5.5.20.0200.07321.82
5.5.10.0130.07721.75
5.5.00.0100.07321.66
5.4.450.0100.08320.64
5.4.440.0270.06721.24
5.4.430.0000.08320.94
5.4.420.0030.06321.11
5.4.410.0100.04720.97
5.4.400.0130.08020.58
5.4.390.0170.07720.93
5.4.380.0070.07020.74
5.4.370.0200.07720.79
5.4.360.0130.08020.75
5.4.350.0170.07020.77
5.4.340.0030.09020.57
5.4.320.0200.07320.71
5.4.310.0100.07720.44
5.4.300.0200.06720.82
5.4.290.0130.07320.68
5.4.280.0100.08020.75
5.4.270.0170.07320.54
5.4.260.0030.08320.57
5.4.250.0100.08020.70
5.4.240.0130.06320.63
5.4.230.0100.07720.14
5.4.220.0130.07720.43
5.4.210.0200.04320.27
5.4.200.0030.08320.37
5.4.190.0170.05019.78
5.4.180.0070.04719.93
5.4.170.0070.07320.75
5.4.160.0200.06720.63
5.4.150.0200.04720.55
5.4.140.0130.07717.65
5.4.130.0030.08018.09
5.4.120.0030.08018.13
5.4.110.0130.07018.20
5.4.100.0100.05018.04
5.4.90.0230.05317.45
5.4.80.0170.06317.43
5.4.70.0170.06717.33
5.4.60.0100.05018.06
5.4.50.0100.07718.13
5.4.40.0070.08018.00
5.4.30.0100.07318.16
5.4.20.0070.05718.15
5.4.10.0100.07718.07
5.4.00.0070.07017.47
5.3.290.0030.08314.68
5.3.280.0170.06714.60
5.3.270.0100.05314.60
5.3.260.0100.07714.60
5.3.250.0070.07314.57
5.3.240.0070.07314.59
5.3.230.0130.07014.45
5.3.220.0100.07714.55
5.3.210.0100.04014.52
5.3.200.0100.07314.43
5.3.190.0070.05014.54
5.3.180.0100.06314.53
5.3.170.0130.06014.52
5.3.160.0130.06314.51
5.3.150.0070.08014.55
5.3.140.0030.08014.55
5.3.130.0130.07314.55
5.3.120.0070.07314.41
5.3.110.0070.08014.55
5.3.100.0070.07713.89
5.3.90.0030.06314.01
5.3.80.0100.07314.00
5.3.70.0130.07014.02
5.3.60.0070.07713.87
5.3.50.0070.07713.90
5.3.40.0100.06313.88
5.3.30.0100.07013.70
5.3.20.0030.07713.55
5.3.10.0070.06713.66
5.3.00.0100.07013.43
5.2.170.0100.05711.99
5.2.160.0070.06011.99
5.2.150.0130.06011.99
5.2.140.0100.06311.99
5.2.130.0070.06011.99
5.2.120.0070.06011.99
5.2.110.0100.05011.99
5.2.100.0030.06011.99
5.2.90.0030.06311.99
5.2.80.0070.05711.99
5.2.70.0030.06711.99
5.2.60.0070.06311.99
5.2.50.0030.04311.99
5.2.40.0030.06311.99
5.2.30.0030.06311.99
5.2.20.0070.06011.99
5.2.10.0100.05711.99
5.2.00.0030.06311.99
5.1.60.0130.04011.99
5.1.50.0030.05011.99
5.1.40.0030.05311.99
5.1.30.0000.03711.99
5.1.20.0070.05011.99
5.1.10.0030.05711.99
5.1.00.0030.05311.99
5.0.50.0030.04711.99
5.0.40.0070.04311.99
5.0.30.0030.06011.99
5.0.20.0130.03311.99
5.0.10.0170.01711.99
5.0.00.0030.06011.99
4.4.90.0000.04011.99
4.4.80.0000.04011.99
4.4.70.0000.04011.99
4.4.60.0000.04011.99
4.4.50.0000.03711.99
4.4.40.0000.05311.99
4.4.30.0070.03311.99
4.4.20.0070.03311.99
4.4.10.0000.03711.99
4.4.00.0070.04711.99
4.3.110.0030.03311.99
4.3.100.0030.03311.99
4.3.90.0000.01711.99
4.3.80.0030.05311.99
4.3.70.0000.02311.99
4.3.60.0070.03311.99
4.3.50.0000.02711.99
4.3.40.0000.04711.99
4.3.30.0000.02711.99
4.3.20.0000.04011.99
4.3.10.0030.03311.99
4.3.00.0000.03311.99

preferences:
60.65 ms | 401 KiB | 5 Q