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_map('array_values', $tempArray); for($i = 0; $i < count($tempArray); $i++) { $combos[] = $baseNumber.$tempArray[$i].$tempArray[$i + 1]; $value = $tempArray[$i]; unset($tempArray[$i]); $numbers[] = $value; } } return $combos; } print_r(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.0110.00718.68
8.3.50.0100.01021.15
8.3.40.0070.00718.92
8.3.30.0080.00819.22
8.3.20.0040.00420.34
8.3.10.0080.00023.65
8.3.00.0000.00819.50
8.2.180.0080.00816.50
8.2.170.0090.00622.96
8.2.160.0090.00918.95
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0000.00822.24
8.2.110.0060.00320.38
8.2.100.0080.00318.09
8.2.90.0040.00419.18
8.2.80.0040.00417.97
8.2.70.0060.00317.38
8.2.60.0060.00318.04
8.2.50.0090.00018.07
8.2.40.0060.00320.00
8.2.30.0040.00418.14
8.2.20.0040.00417.73
8.2.10.0080.00018.16
8.2.00.0050.00517.81
8.1.280.0070.00725.92
8.1.270.0080.00022.11
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0060.00323.98
8.1.230.0040.00719.02
8.1.220.0050.00317.77
8.1.210.0030.00518.77
8.1.200.0000.00917.35
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0040.00418.51
8.1.160.0040.00422.07
8.1.150.0040.00418.90
8.1.140.0050.00317.37
8.1.130.0040.00417.77
8.1.120.0030.00317.39
8.1.110.0050.00317.50
8.1.100.0000.00817.48
8.1.90.0040.00817.36
8.1.80.0000.00717.48
8.1.70.0030.00317.45
8.1.60.0080.00017.59
8.1.50.0000.00817.54
8.1.40.0030.00617.43
8.1.30.0040.00417.65
8.1.20.0040.00417.62
8.1.10.0040.00417.63
8.1.00.0040.00417.59
8.0.300.0000.00718.77
8.0.290.0060.00316.75
8.0.280.0040.00418.43
8.0.270.0000.00716.89
8.0.260.0050.00317.14
8.0.250.0030.00316.88
8.0.240.0040.00416.97
8.0.230.0030.00617.00
8.0.220.0030.00316.95
8.0.210.0000.00816.93
8.0.200.0060.00016.95
8.0.190.0080.00316.84
8.0.180.0040.00416.90
8.0.170.0000.00816.89
8.0.160.0030.00316.86
8.0.150.0050.00516.95
8.0.140.0000.00716.86
8.0.130.0000.00813.38
8.0.120.0080.00016.97
8.0.110.0040.00416.95
8.0.100.0050.00216.85
8.0.90.0040.00416.90
8.0.80.0160.00316.93
8.0.70.0040.00417.06
8.0.60.0000.00717.08
8.0.50.0040.00416.96
8.0.30.0140.00517.33
8.0.20.0100.00817.40
8.0.10.0030.00717.08
8.0.00.0080.00916.85
7.4.330.0000.00515.02
7.4.320.0060.00316.52
7.4.300.0070.00016.53
7.4.290.0000.00616.63
7.4.280.0000.00716.43
7.4.270.0030.00316.66
7.4.260.0000.00716.57
7.4.250.0070.00016.60
7.4.240.0030.00316.60
7.4.230.0000.00716.60
7.4.220.0090.00916.67
7.4.210.0040.01116.59
7.4.200.0040.00416.36
7.4.160.0070.00716.45
7.4.150.0130.00617.40
7.4.140.0070.01017.86
7.4.130.0110.00716.56
7.4.120.0130.00316.57
7.4.110.0080.01116.69
7.4.100.0030.01416.47
7.4.90.0090.00916.44
7.4.80.0120.01019.39
7.4.70.0150.00316.52
7.4.60.0080.00816.52
7.4.50.0030.00616.40
7.4.40.0080.00816.56
7.4.30.0050.01416.52
7.4.00.0030.01215.16
7.3.330.0000.00513.46
7.3.320.0020.00213.24
7.3.310.0080.00016.33
7.3.300.0030.00316.41
7.3.290.0070.00816.44
7.3.280.0110.00516.45
7.3.270.0140.00617.40
7.3.260.0160.00016.41
7.3.250.0130.00516.61
7.3.240.0130.01016.51
7.3.230.0120.00916.50
7.3.210.0060.01016.41
7.3.200.0090.00719.39
7.3.190.0100.01016.55
7.3.180.0040.01216.58
7.3.170.0080.01116.45
7.3.160.0130.00316.55
7.3.10.0070.00316.46
7.3.00.0090.00616.72
7.2.330.0040.01516.71
7.2.320.0100.00716.64
7.2.310.0140.00916.89
7.2.300.0040.01116.60
7.2.290.0070.01016.86
7.2.130.0030.00617.01
7.2.120.0070.00716.76
7.2.110.0090.00316.98
7.2.100.0030.00616.77
7.2.90.0040.01116.85
7.2.80.0000.01516.89
7.2.70.0000.01417.04
7.2.60.0150.00616.96
7.2.50.0040.00816.97
7.2.40.0070.00316.92
7.2.30.0130.00316.91
7.2.20.0090.00316.98
7.2.10.0030.00717.02
7.2.00.0060.00918.02
7.1.250.0030.00515.79
7.1.200.0000.00915.72
7.1.100.0000.01118.14
7.1.70.0000.00717.01
7.1.60.0100.01319.11
7.1.50.0030.02117.12
7.1.00.0030.07722.30
7.0.200.0040.00416.95
7.0.140.0000.07721.95
7.0.60.0070.08019.88
7.0.50.0070.04317.90
7.0.40.0030.09020.23
7.0.30.0500.08020.23
7.0.20.0170.08320.12
7.0.10.0130.03320.20
7.0.00.0100.03320.22
5.6.280.0070.07021.16
5.6.210.0070.08720.65
5.6.200.0070.08718.20
5.6.190.0100.07320.77
5.6.180.0200.04720.58
5.6.170.0230.08320.58
5.6.160.0100.07720.59
5.6.150.0100.04718.30
5.6.140.0100.07718.14
5.6.130.0070.08018.28
5.6.120.0070.07320.98
5.6.110.0030.04320.98
5.6.100.0000.08020.92
5.6.90.0170.06020.99
5.6.80.0070.08320.53
5.6.70.3630.04320.35
5.5.350.0170.07720.43
5.5.340.0000.05018.08
5.5.330.0100.04020.27
5.5.320.0170.03720.25
5.5.310.0200.08320.51
5.5.300.0070.04017.97
5.5.290.0130.06018.07
5.5.280.0030.04320.80
5.5.270.0000.07020.76
5.5.260.0100.06320.64
5.5.250.0100.05720.61
5.5.240.0230.08320.26
5.4.450.0970.06019.61
5.4.440.0870.05719.16
5.4.430.0870.04319.53
5.4.420.0930.00019.54
5.4.410.0630.00019.45
5.4.400.0630.00019.22
5.4.390.0670.00019.25
5.4.380.0730.00019.04
5.4.370.0630.00019.16
5.4.360.0600.00019.12
5.4.350.0670.00019.13
5.4.340.0090.03512.02
5.4.320.0080.03712.51
5.4.310.0050.04312.50
5.4.300.0070.04112.50
5.4.290.0040.04112.50
5.4.280.0050.03612.39
5.4.270.0050.04412.40
5.4.260.0070.05412.40
5.4.250.0070.05212.39
5.4.240.0100.04212.40
5.4.230.0040.04012.39
5.4.220.0070.03912.39
5.4.210.0080.03912.39
5.4.200.0060.03912.39
5.4.190.0050.03812.39
5.4.180.0080.03412.38
5.4.170.0040.04012.39
5.4.160.0110.04412.39
5.4.150.0080.04812.39
5.4.140.0050.05112.07
5.4.130.0050.04012.06
5.4.120.0060.03612.02
5.4.110.0080.03812.01
5.4.100.0060.03812.02
5.4.90.0080.04112.01
5.4.80.0090.03512.01
5.4.70.0040.03612.00
5.4.60.0050.04512.01
5.4.50.0050.03712.01
5.4.40.0060.04212.00
5.4.30.0060.03911.99
5.4.20.0060.03811.99
5.4.10.0070.03412.00
5.4.00.0050.03711.48
5.3.290.0060.04612.80
5.3.280.0070.04412.70
5.3.270.0070.04112.72
5.3.260.0050.04112.72
5.3.250.0090.03612.72
5.3.240.0070.03812.72
5.3.230.0030.04112.71
5.3.220.0100.03212.68
5.3.210.0090.03912.68
5.3.200.0070.03812.68
5.3.190.0060.03812.68
5.3.180.0060.03712.68
5.3.170.0050.03912.67
5.3.160.0060.03712.68
5.3.150.0070.03612.68
5.3.140.0050.04012.66
5.3.130.0020.04312.66
5.3.120.0060.03912.66
5.3.110.0070.04112.66
5.3.100.0060.04312.12
5.3.90.0070.03612.10
5.3.80.0040.03912.09
5.3.70.0090.03512.09
5.3.60.0100.03312.07
5.3.50.0060.03912.02
5.3.40.0070.04312.02
5.3.30.0040.04211.98
5.3.20.0040.03911.76
5.3.10.0040.03811.73
5.3.00.0050.04011.71
5.2.170.0050.0309.22
5.2.160.0050.0309.21
5.2.150.0030.0339.22
5.2.140.0090.0299.21
5.2.130.0080.0369.17
5.2.120.0050.0299.18
5.2.110.0070.0279.18
5.2.100.0090.0299.18
5.2.90.0030.0319.18
5.2.80.0080.0299.17
5.2.70.0080.0299.17
5.2.60.0060.0419.13
5.2.50.0080.0339.09
5.2.40.0030.0359.07
5.2.30.0050.0359.05
5.2.20.0040.0319.03
5.2.10.0020.0328.94
5.2.00.0050.0348.80
5.1.60.0040.0278.09
5.1.50.0040.0288.08
5.1.40.0060.0328.06
5.1.30.0060.0288.42
5.1.20.0060.0318.44
5.1.10.0050.0298.16
5.1.00.0040.0358.16
5.0.50.0040.0246.66
5.0.40.0030.0256.52
5.0.30.0070.0316.33
5.0.20.0040.0206.29
5.0.10.0030.0226.28
5.0.00.0040.0326.27
4.4.90.0020.0174.78
4.4.80.0040.0154.75
4.4.70.0010.0194.76
4.4.60.0040.0154.75
4.4.50.0030.0184.77
4.4.40.0050.0274.71
4.4.30.0030.0194.76
4.4.20.0050.0144.84
4.4.10.0010.0194.85
4.4.00.0050.0234.75
4.3.110.0020.0224.67
4.3.100.0020.0164.66
4.3.90.0020.0174.64
4.3.80.0020.0284.58
4.3.70.0070.0204.63
4.3.60.0010.0234.62
4.3.50.0070.0264.63
4.3.40.0070.0284.54
4.3.30.0030.0203.32
4.3.20.0020.0213.29
4.3.10.0020.0213.26
4.3.00.0200.03710.05

preferences:
43.11 ms | 401 KiB | 5 Q