3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array('A', 'B'); $array2 = array('1', '2', '3'); $num = count($array2); //The total number of possible combinations $total = pow(2, $num); //Loop through each possible combination for ($i = 0; $i < $total; $i++) { $ff=''; //For each combination check if each bit is set for ($j = 0; $j < $num; $j++) { //Is bit $j set in $i? if (pow(2, $j) & $i) $ff = $ff.''.$array2[$j]; } $temp[]=$ff; } print_r(array_shift($temp));

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.0070.00718.41
8.3.50.0220.00621.99
8.3.40.0110.00418.60
8.3.30.0140.00319.05
8.3.20.0040.00420.29
8.3.10.0070.00021.85
8.3.00.0070.00719.43
8.2.180.0070.01116.50
8.2.170.0070.00722.96
8.2.160.0100.00320.52
8.2.150.0050.00224.18
8.2.140.0060.00324.66
8.2.130.0050.00326.16
8.2.120.0000.00821.04
8.2.110.0060.00322.13
8.2.100.0070.00418.34
8.2.90.0000.00919.29
8.2.80.0040.00417.97
8.2.70.0050.00317.63
8.2.60.0040.00417.93
8.2.50.0000.00818.07
8.2.40.0040.00418.16
8.2.30.0070.00418.34
8.2.20.0000.00717.76
8.2.10.0040.00418.01
8.2.00.0080.00017.59
8.1.280.0070.00725.92
8.1.270.0000.00823.73
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0040.00424.01
8.1.230.0030.00719.06
8.1.220.0000.00817.74
8.1.210.0080.00018.77
8.1.200.0100.00017.23
8.1.190.0090.00217.13
8.1.180.0020.00518.10
8.1.170.0050.00318.68
8.1.160.0050.00222.00
8.1.150.0000.00718.88
8.1.140.0040.00417.56
8.1.130.0040.00417.73
8.1.120.0050.00217.51
8.1.110.0040.00417.34
8.1.100.0070.00017.45
8.1.90.0000.00717.44
8.1.80.0020.00517.46
8.1.70.0070.00017.45
8.1.60.0060.00317.59
8.1.50.0000.00817.41
8.1.40.0080.00017.54
8.1.30.0000.00817.71
8.1.20.0080.00017.50
8.1.10.0000.00717.62
8.1.00.0030.00617.57
8.0.300.0000.00718.77
8.0.290.0050.00516.63
8.0.280.0000.00718.36
8.0.270.0080.00017.14
8.0.260.0030.00318.40
8.0.250.0030.00316.96
8.0.240.0070.00016.96
8.0.230.0040.00416.95
8.0.220.0050.00316.91
8.0.210.0050.00316.92
8.0.200.0030.00316.88
8.0.190.0070.00016.86
8.0.180.0070.00016.93
8.0.170.0040.00416.93
8.0.160.0070.00016.79
8.0.150.0000.00716.80
8.0.140.0060.00316.77
8.0.130.0030.00313.32
8.0.120.0080.00016.87
8.0.110.0000.00716.80
8.0.100.0000.00716.93
8.0.90.0050.00316.77
8.0.80.0060.01016.93
8.0.70.0000.00816.76
8.0.60.0000.00716.77
8.0.50.0060.00316.91
8.0.30.0100.00816.99
8.0.20.0130.00517.40
8.0.10.0080.00017.03
8.0.00.0100.00816.71
7.4.330.0000.00615.09
7.4.320.0000.00616.58
7.4.300.0000.00616.60
7.4.290.0000.00816.50
7.4.280.0070.00016.53
7.4.270.0000.00816.58
7.4.260.0030.00316.48
7.4.250.0000.00816.61
7.4.240.0050.00216.57
7.4.230.0000.00716.70
7.4.220.0090.00616.50
7.4.210.0040.01816.55
7.4.200.0000.00716.57
7.4.160.0150.00316.56
7.4.150.0070.01017.40
7.4.140.0070.01117.86
7.4.130.0120.00616.47
7.4.120.0100.00816.51
7.4.110.0070.01016.73
7.4.100.0150.00416.61
7.4.90.0110.00716.64
7.4.80.0180.00719.39
7.4.70.0080.00816.49
7.4.60.0100.00716.48
7.4.50.0040.00016.32
7.4.40.0090.00716.32
7.4.30.0110.00516.41
7.4.10.0100.01016.68
7.4.00.0100.00715.78
7.3.330.0000.00513.24
7.3.320.0030.00313.19
7.3.310.0000.00716.22
7.3.300.0030.00316.31
7.3.290.0070.00816.25
7.3.280.0100.00816.30
7.3.270.0140.00317.40
7.3.260.0050.01416.27
7.3.250.0060.01316.28
7.3.240.0090.00816.32
7.3.230.0060.01916.42
7.3.210.0100.00916.23
7.3.200.0100.01019.39
7.3.190.0130.00316.49
7.3.180.0030.01316.40
7.3.170.0100.00616.47
7.3.160.0030.01616.39
7.3.130.0100.00216.46
7.3.120.0050.00915.60
7.3.110.0100.00716.41
7.3.100.0030.00716.44
7.3.90.0090.00616.19
7.3.80.0070.00716.25
7.3.70.0040.01116.37
7.3.60.0100.01016.21
7.3.50.0060.00316.28
7.3.40.0060.00916.23
7.3.30.0040.00816.41
7.3.20.0040.01118.20
7.3.10.0070.00817.40
7.3.00.0080.00617.30
7.2.330.0130.01016.57
7.2.320.0100.01316.45
7.2.310.0120.00416.48
7.2.300.0060.01216.47
7.2.290.0070.01316.68
7.2.260.0060.01316.71
7.2.250.0070.01316.76
7.2.240.0000.01016.42
7.2.230.0100.00316.29
7.2.220.0080.01116.76
7.2.210.0030.01516.40
7.2.200.0140.00316.45
7.2.190.0100.01016.60
7.2.180.0000.01516.45
7.2.170.0030.01316.45
7.2.160.0000.01516.18
7.2.150.0050.00518.41
7.2.140.0030.01018.39
7.2.130.0080.00717.68
7.2.120.0080.00917.61
7.2.110.0030.01217.53
7.2.100.0100.00617.48
7.2.90.0040.01417.38
7.2.80.0060.00817.56
7.2.70.0050.00517.60
7.2.60.0110.00717.29
7.2.50.0110.00617.51
7.2.40.0110.00717.55
7.2.30.0050.01117.66
7.2.20.0090.00617.60
7.2.10.0070.00717.44
7.2.00.0050.00718.23
7.1.330.0030.01617.45
7.1.320.0040.01217.64
7.1.310.0110.00317.24
7.1.300.0030.01017.22
7.1.290.0070.00717.45
7.1.280.0060.00617.45
7.1.270.0080.00617.43
7.1.260.0120.00617.38
7.1.250.0060.00416.60
7.1.240.0070.01017.26
7.1.230.0080.00017.29
7.1.220.0070.00717.44
7.1.210.0070.01017.30
7.1.200.0040.00816.59
7.1.190.0000.01317.39
7.1.180.0030.01017.48
7.1.170.0030.00717.29
7.1.160.0070.00717.29
7.1.150.0090.00617.39
7.1.140.0060.00917.39
7.1.130.0060.00617.49
7.1.120.0090.00617.24
7.1.110.0100.00017.35
7.1.100.0020.01117.81
7.1.90.0030.01017.30
7.1.80.0100.00717.33
7.1.70.0060.00617.22
7.1.60.0090.01018.36
7.1.50.0050.01417.17
7.1.40.0030.00517.24
7.1.30.0090.00317.36
7.1.20.0060.00617.46
7.1.10.0030.00617.31
7.1.00.0070.04019.86
7.0.330.0030.01417.17
7.0.320.0000.00916.94
7.0.310.0100.01016.99
7.0.300.0060.00817.05
7.0.290.0000.01417.04
7.0.280.0040.00817.12
7.0.270.0070.00317.00
7.0.260.0060.00617.02
7.0.250.0090.00616.92
7.0.240.0040.00717.08
7.0.230.0060.00617.12
7.0.220.0040.00717.01
7.0.210.0060.00617.05
7.0.200.0120.00416.67
7.0.190.0030.01016.99
7.0.180.0080.00617.12
7.0.170.0040.00717.04
7.0.160.0120.00316.98
7.0.150.0030.00517.05
7.0.140.0080.03619.54
7.0.130.0070.00717.05
7.0.120.0080.00816.96
7.0.110.0030.01016.98
7.0.100.0380.04018.57
7.0.90.0300.04718.45
7.0.80.0230.05018.44
7.0.70.0320.03918.43
7.0.60.0250.04518.51
7.0.50.0260.04318.61
7.0.40.0050.02317.47
7.0.30.0070.03717.52
7.0.20.0030.03017.52
7.0.10.0080.03817.49
7.0.00.0050.03517.48
5.6.400.0030.01216.08
5.6.390.0060.00915.79
5.6.380.0060.00316.23
5.6.370.0040.01516.10
5.6.360.0070.00716.11
5.6.350.0070.00716.30
5.6.340.0070.00316.07
5.6.330.0030.01316.07
5.6.320.0000.01416.01
5.6.310.0030.01016.09
5.6.300.0030.01015.63
5.6.290.0030.01015.59
5.6.280.0070.03918.38
5.6.270.0100.00315.97
5.6.260.0040.00815.64
5.6.250.0130.03718.24
5.6.240.0120.04018.18
5.6.230.0140.04018.33
5.6.220.0070.04018.26
5.6.210.0080.04418.10
5.6.200.0100.03518.45
5.6.190.0050.02318.45
5.6.180.0030.04718.50
5.6.170.0040.04918.42
5.6.160.0090.02718.40
5.6.150.0060.03918.44
5.6.140.0070.04218.43
5.6.130.0080.03918.38
5.6.120.0100.04218.44
5.6.110.0120.04018.42
5.6.100.0080.04518.51
5.6.90.0030.04518.48
5.6.80.0050.03718.13
5.6.70.0070.04118.13
5.6.60.0090.03018.17
5.6.50.0060.03718.13
5.6.40.0080.03817.94
5.6.30.0160.03018.23
5.6.20.0070.02318.04
5.6.10.0100.03818.06
5.6.00.0080.04118.17
5.5.380.0080.02718.20
5.5.370.0030.04718.23
5.5.360.0080.03018.15
5.5.350.0090.02418.14
5.5.340.0080.01718.37
5.5.330.0100.04018.20
5.5.320.0070.04418.42
5.5.310.0070.04318.30
5.5.300.0080.03918.21
5.5.290.0080.04118.43
5.5.280.0090.04018.26
5.5.270.0090.03718.36
5.5.260.0090.04218.46
5.5.250.0120.02818.25
5.5.240.0070.04518.02
5.5.230.0020.03618.01
5.5.220.0070.04717.93
5.5.210.0110.04118.08
5.5.200.0130.03717.80
5.5.190.0050.04618.04
5.5.180.0030.04318.09
5.5.170.0040.01115.95
5.5.160.0030.03417.99
5.5.150.0060.04517.96
5.5.140.0070.04518.10
5.5.130.0070.04318.07
5.5.120.0070.04218.04
5.5.110.0060.02618.17
5.5.100.0080.02617.89
5.5.90.0070.04317.87
5.5.80.0070.04317.90
5.5.70.0070.04017.99
5.5.60.0100.03617.89
5.5.50.0080.04018.02
5.5.40.0120.03817.80
5.5.30.0070.03917.89
5.5.20.0030.03717.94
5.5.10.0090.02617.93
5.5.00.0050.04517.91
5.4.450.0050.04216.04
5.4.440.0020.02415.84
5.4.430.0080.02715.79
5.4.420.0070.03816.00
5.4.410.0070.04015.85
5.4.400.0130.02515.89
5.4.390.0030.04515.69
5.4.380.0090.03515.74
5.4.370.0050.04715.76
5.4.360.0020.04215.84
5.4.350.0110.03515.80
5.4.340.0080.03215.74
5.4.330.0000.01212.62
5.4.320.0050.04215.92
5.4.310.0050.04015.86
5.4.300.0020.02915.87
5.4.290.0100.03715.78
5.4.280.0070.03915.73
5.4.270.0060.03815.89
5.4.260.0030.04215.79
5.4.250.0090.03715.80
5.4.240.0030.04315.89
5.4.230.0070.03915.80
5.4.220.0100.03315.78
5.4.210.0090.03915.77
5.4.200.0070.03515.88
5.4.190.0080.03815.74
5.4.180.0000.04215.85
5.4.170.0040.04415.89
5.4.160.0050.02115.75
5.4.150.0050.04015.84
5.4.140.0030.02514.46
5.4.130.0080.03514.58
5.4.120.0080.03714.64
5.4.110.0080.03514.43
5.4.100.0080.03514.45
5.4.90.0080.04014.38
5.4.80.0090.03714.48
5.4.70.0060.02514.47
5.4.60.0050.03414.43
5.4.50.0100.03014.48
5.4.40.0080.02014.41
5.4.30.0050.02414.34
5.4.20.0020.02414.47
5.4.10.0020.02614.40
5.4.00.0070.02014.14
5.3.290.0050.04313.85
5.3.280.0030.04013.90
5.3.270.0050.04013.83
5.3.260.0070.04313.76
5.3.250.0080.03513.78
5.3.240.0020.04213.75
5.3.230.0050.04313.75
5.3.220.0000.04713.68
5.3.210.0030.04213.88
5.3.200.0070.03613.68
5.3.190.0050.03213.65
5.3.180.0050.03713.82
5.3.170.0060.03513.76
5.3.160.0070.02513.89
5.3.150.0070.02713.85
5.3.140.0080.01713.79
5.3.130.0060.02713.67
5.3.120.0000.02913.90
5.3.110.0020.03613.77
5.3.100.0030.02113.48
5.3.90.0070.02413.41
5.3.80.0050.02013.45
5.3.70.0050.02113.44
5.3.60.0050.02213.39
5.3.50.0020.02313.41
5.3.40.0030.04413.33
5.3.30.0040.02313.39
5.3.20.0050.03313.15
5.3.10.0070.02313.13
5.3.00.0050.02213.12
5.2.170.0030.02711.74
5.2.160.0030.03011.74
5.2.150.0070.02311.74
5.2.140.0000.03011.74
5.2.130.0030.02711.74
5.2.120.0030.02711.74
5.2.110.0030.02711.74
5.2.100.0030.05711.74
5.2.90.0000.03011.74
5.2.80.0030.05011.74
5.2.70.0030.05711.74
5.2.60.0030.04311.74
5.2.50.0030.03011.74
5.2.40.0030.02711.74
5.2.30.0000.04011.74
5.2.20.0000.03711.74
5.2.10.0000.03311.74
5.2.00.0000.04011.74
5.1.60.0030.02311.74
5.1.50.0030.02011.74
5.1.40.0030.02311.74
5.1.30.0000.03011.74
5.1.20.0000.04711.74
5.1.10.0000.03311.74
5.1.00.0000.03311.74
5.0.50.0000.02011.74
5.0.40.0070.01311.74
5.0.30.0000.03011.74
5.0.20.0030.02011.74
5.0.10.0100.01311.74
5.0.00.0030.03011.74
4.4.90.0000.03011.74
4.4.80.0070.02011.74
4.4.70.0000.01711.74
4.4.60.0000.01711.74
4.4.50.0030.01311.74
4.4.40.0000.02711.74
4.4.30.0000.02011.74
4.4.20.0000.02011.74
4.4.10.0000.02011.74
4.4.00.0000.04011.74
4.3.110.0000.01311.74
4.3.100.0000.02011.74
4.3.90.0070.01011.74
4.3.80.0000.02311.74
4.3.70.0030.01311.74
4.3.60.0030.01311.74
4.3.50.0000.02011.74
4.3.40.0000.02011.74
4.3.30.0000.01711.74
4.3.20.0000.03011.74
4.3.10.0000.01711.74
4.3.00.0000.01711.74

preferences:
39.3 ms | 401 KiB | 5 Q