3v4l.org

run code in 300+ PHP versions simultaneously
<?php function findFamily($n) { $numbers = str_split($n); $combos = array(); $count = count($numbers); for($i = 0; $i < $count; $i++) { $baseNumber = $numbers[$i]; $tempArray = $numbers; unset($tempArray[$i]); $tempArray = array_values($tempArray); $countTempArray = count($tempArray); for($x = 0; $x < $countTempArray; $x++) { $combonation = ''; $sortedTempArray = array_values($tempArray); for($z = 0; $z < count($sortedTempArray); $z++) $combonation .= $sortedTempArray[$z]; $combos[] = $baseNumber.$combonation; $value = $tempArray[$x]; unset($tempArray[$x]); $tempArray[] = $value; } } return $combos; } var_export(FindFamily("123")); ?>

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.0140.00418.43
8.3.50.0110.01516.31
8.3.40.0150.00318.79
8.3.30.0110.00419.22
8.3.20.0030.00520.31
8.3.10.0000.00821.90
8.3.00.0040.00419.38
8.2.180.0140.00716.50
8.2.170.0070.01422.96
8.2.160.0070.00720.39
8.2.150.0000.00824.18
8.2.140.0080.00024.66
8.2.130.0070.00026.16
8.2.120.0000.00722.27
8.2.110.0100.00622.31
8.2.100.0110.00417.63
8.2.90.0000.00719.21
8.2.80.0080.00017.97
8.2.70.0000.00817.63
8.2.60.0060.00318.05
8.2.50.0030.00618.07
8.2.40.0080.00020.00
8.2.30.0000.00718.14
8.2.20.0070.00017.74
8.2.10.0040.00418.22
8.2.00.0080.00017.66
8.1.280.0080.00825.92
8.1.270.0050.00522.02
8.1.260.0000.00826.35
8.1.250.0040.00428.09
8.1.240.0090.00023.83
8.1.230.0040.00817.42
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0100.00017.38
8.1.190.0080.00016.98
8.1.180.0080.00018.10
8.1.170.0040.00418.55
8.1.160.0000.00822.10
8.1.150.0000.00718.92
8.1.140.0000.00717.48
8.1.130.0000.00717.77
8.1.120.0070.00017.48
8.1.110.0050.00317.51
8.1.100.0040.00417.43
8.1.90.0000.00817.51
8.1.80.0040.00417.45
8.1.70.0000.00717.38
8.1.60.0060.00317.61
8.1.50.0000.00817.44
8.1.40.0040.00417.42
8.1.30.0030.00617.53
8.1.20.0050.00217.66
8.1.10.0040.00417.51
8.1.00.0000.00817.59
8.0.300.0070.00018.77
8.0.290.0080.00016.63
8.0.280.0070.00018.55
8.0.270.0030.00317.23
8.0.260.0060.00017.31
8.0.250.0070.00016.96
8.0.240.0040.00416.95
8.0.230.0030.00316.98
8.0.220.0000.00716.91
8.0.210.0000.00716.82
8.0.200.0020.00516.98
8.0.190.0040.00416.88
8.0.180.0070.00016.98
8.0.170.0080.00016.98
8.0.160.0030.00316.89
8.0.150.0070.00016.85
8.0.140.0040.00416.79
8.0.130.0040.00413.39
8.0.120.0040.00416.80
8.0.110.0000.00916.87
8.0.100.0000.00716.82
8.0.90.0040.00416.77
8.0.80.0100.00916.99
8.0.70.0050.00216.87
8.0.60.0030.00516.75
8.0.50.0070.00016.95
8.0.30.0110.01017.14
8.0.20.0060.01317.40
8.0.10.0000.00817.11
8.0.00.0080.01516.77
7.4.330.0050.00015.05
7.4.320.0000.00616.55
7.4.300.0030.00316.55
7.4.290.0030.00316.45
7.4.280.0110.00016.50
7.4.270.0040.00416.41
7.4.260.0030.00416.39
7.4.250.0040.00416.49
7.4.240.0020.00516.55
7.4.230.0070.00016.36
7.4.220.0030.01716.56
7.4.210.0120.00916.66
7.4.200.0000.00816.41
7.4.160.0080.01216.63
7.4.150.0120.01217.40
7.4.140.0070.01517.86
7.4.130.0110.00616.46
7.4.120.0080.01016.57
7.4.110.0060.01016.35
7.4.100.0060.01016.61
7.4.90.0120.00416.41
7.4.80.0060.01319.39
7.4.70.0100.00716.53
7.4.60.0030.01316.58
7.4.50.0000.00516.30
7.4.40.0120.00616.70
7.4.30.0040.01316.38
7.4.00.0030.01014.94
7.3.330.0030.00313.32
7.3.320.0000.00513.44
7.3.310.0070.00016.25
7.3.300.0000.00716.31
7.3.290.0070.00916.35
7.3.280.0080.00716.36
7.3.270.0080.00817.40
7.3.260.0130.00316.36
7.3.250.0130.00416.59
7.3.240.0030.01416.38
7.3.230.0030.01516.41
7.3.210.0090.00616.48
7.3.200.0130.00919.39
7.3.190.0140.00716.56
7.3.180.0090.00916.59
7.3.170.0060.00916.33
7.3.160.0130.00316.32
7.2.330.0130.00316.63
7.2.320.0120.01216.69
7.2.310.0140.00316.46
7.2.300.0130.00616.63
7.2.290.0100.00716.73
7.2.60.0060.00917.10
7.2.00.0060.00619.43
7.1.200.0000.01515.60
7.1.100.0000.01118.07
7.1.70.0030.00617.34
7.1.60.0130.01019.11
7.1.50.0120.00317.12
7.1.00.0000.08022.28
7.0.200.0030.00716.80
7.0.140.0030.07321.94
7.0.60.0100.08019.89
7.0.50.0070.04317.83
7.0.40.0130.07020.13
7.0.30.0600.07320.20
7.0.20.0300.07020.22
7.0.10.0070.04720.05
7.0.00.0130.05720.20
5.6.280.0030.07321.04
5.6.210.0070.07320.67
5.6.200.0130.07318.26
5.6.190.0070.06720.67
5.6.180.0370.05720.65
5.6.170.0400.04020.61
5.6.160.0100.08020.50
5.6.150.0130.07718.18
5.6.140.0070.06718.22
5.6.130.0100.03718.18
5.6.120.0070.03720.95
5.6.110.0070.08721.14
5.6.100.0030.07321.00
5.6.90.0070.08321.00
5.6.80.0170.07020.41
5.6.70.3800.04320.37
5.5.350.0100.05020.35
5.5.340.0130.07718.02
5.5.330.0130.08020.57
5.5.320.0170.07020.34
5.5.310.0330.07020.30
5.5.300.0000.08717.95
5.5.290.0100.08017.96
5.5.280.0070.08320.70
5.5.270.0200.07720.74
5.5.260.0130.08320.77
5.5.250.0130.07720.59
5.5.240.0130.03320.27
5.4.450.0100.05319.46
5.4.440.0830.06319.57
5.4.430.0900.06319.46
5.4.420.0870.00019.38
5.4.410.0630.00019.41
5.4.400.0630.00019.16
5.4.390.0630.00019.21
5.4.380.0630.00019.03
5.4.370.0670.00019.02
5.4.360.0630.00019.13
5.4.350.0630.00019.03
5.4.340.0060.03412.02
5.4.320.0050.03712.50
5.4.310.0040.04112.50
5.4.300.0090.03312.50
5.4.290.0040.04012.50
5.4.280.0050.03612.39
5.4.270.0060.03612.40
5.4.260.0060.03712.40
5.4.250.0070.03612.40
5.4.240.0030.03912.39
5.4.230.0090.03312.39
5.4.220.0050.03612.39
5.4.210.0050.04112.39
5.4.200.0060.03712.39
5.4.190.0080.03412.39
5.4.180.0060.03612.38
5.4.170.0060.04012.39
5.4.160.0060.04012.39
5.4.150.0050.03712.38
5.4.140.0060.03712.07
5.4.130.0080.03312.06
5.4.120.0090.03212.02
5.4.110.0050.03612.02
5.4.100.0040.03712.02
5.4.90.0060.04212.01
5.4.80.0050.04012.02
5.4.70.0050.03912.01
5.4.60.0060.03712.00
5.4.50.0090.03212.01
5.4.40.0060.03912.00
5.4.30.0030.03811.99
5.4.20.0040.03811.99
5.4.10.0070.03311.99
5.4.00.0070.03411.48
5.3.290.0050.04012.80
5.3.280.0070.03712.71
5.3.270.0070.03712.73
5.3.260.0090.03612.71
5.3.250.0050.03812.72
5.3.240.0070.03612.72
5.3.230.0050.04212.71
5.3.220.0050.03812.68
5.3.210.0040.04112.68
5.3.200.0080.03412.68
5.3.190.0090.04012.68
5.3.180.0080.03712.67
5.3.170.0050.03712.67
5.3.160.0080.03512.67
5.3.150.0050.03812.68
5.3.140.0040.04412.66
5.3.130.0050.04312.66
5.3.120.0070.03912.66
5.3.110.0080.03912.65
5.3.100.0050.03812.12
5.3.90.0050.04112.10
5.3.80.0080.03512.09
5.3.70.0060.03712.09
5.3.60.0050.04012.07
5.3.50.0050.04512.02
5.3.40.0070.03912.02
5.3.30.0080.03411.98
5.3.20.0060.03711.77
5.3.10.0050.03811.73
5.3.00.0070.03611.71
5.2.170.0030.0339.22
5.2.160.0050.0299.22
5.2.150.0040.0319.21
5.2.140.0080.0389.21
5.2.130.0090.0389.17
5.2.120.0080.0399.18
5.2.110.0050.0339.18
5.2.100.0060.0329.18
5.2.90.0070.0359.18
5.2.80.0040.0319.17
5.2.70.0030.0329.17
5.2.60.0040.0329.13
5.2.50.0050.0319.09
5.2.40.0040.0299.07
5.2.30.0030.0329.05
5.2.20.0040.0309.04
5.2.10.0040.0328.95
5.2.00.0060.0308.81
5.1.60.0060.0228.09
5.1.50.0060.0238.08
5.1.40.0050.0238.07
5.1.30.0040.0288.42
5.1.20.0020.0298.44
5.1.10.0050.0288.16
5.1.00.0070.0328.16
5.0.50.0040.0266.65
5.0.40.0030.0236.52
5.0.30.0050.0306.32
5.0.20.0030.0206.29
5.0.10.0040.0216.28
5.0.00.0040.0306.27
4.4.90.0030.0154.78
4.4.80.0010.0174.75
4.4.70.0010.0194.75
4.4.60.0030.0154.76
4.4.50.0040.0144.77
4.4.40.0010.0274.71
4.4.30.0030.0174.76
4.4.20.0060.0124.84
4.4.10.0010.0174.85
4.4.00.0040.0244.76
4.3.110.0030.0154.66
4.3.100.0030.0154.66
4.3.90.0040.0134.64
4.3.80.0030.0264.58
4.3.70.0020.0154.63
4.3.60.0040.0134.62
4.3.50.0020.0164.63
4.3.40.0010.0254.54
4.3.30.0030.0153.32
4.3.20.0020.0163.30
4.3.10.0020.0163.25
4.3.00.0170.0237.11

preferences:
40.3 ms | 400 KiB | 5 Q