3v4l.org

run code in 300+ PHP versions simultaneously
<?php $colLetter = ''; $colLetter = function($num) use(&$colLetter) { $letters=array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'); //if the number is greater than 26, calculate to get the next letters if($num > 26) { //divide the number by 26 and get rid of the decimal $comp = floor($num / 26); //add the letter to the end of the result and return it if ($comp != 0) { // don't subtract 1 if the comparative variable is greater than 0 return $colLetter($comp) . $letters[($num - $comp * 26)]; } else { return $colLetter($comp) . $letters[($num - $comp * 26) - 1]; } } return $letters[($num-1)]; };

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.0030.02016.50
8.3.50.0230.01022.00
8.3.40.0090.00618.54
8.3.30.0070.00719.05
8.3.20.0000.00720.16
8.3.10.0000.00721.87
8.3.00.0070.00022.37
8.2.180.0110.00418.18
8.2.170.0070.00722.96
8.2.160.0000.01322.25
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0050.00317.63
8.2.110.0130.00722.18
8.2.100.0120.00017.72
8.2.90.0030.00517.97
8.2.80.0040.00419.36
8.2.70.0080.00018.04
8.2.60.0050.00317.79
8.2.50.0030.00518.10
8.2.40.0030.00620.45
8.2.30.0060.00318.13
8.2.20.0030.00517.58
8.2.10.0040.00418.01
8.2.00.0050.00318.05
8.1.280.0030.01025.92
8.1.270.0150.00020.25
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0030.00622.20
8.1.230.0070.00420.85
8.1.220.0040.00417.74
8.1.210.0040.00418.78
8.1.200.0050.00317.34
8.1.190.0000.00817.23
8.1.180.0000.00818.10
8.1.170.0050.00318.52
8.1.160.0000.00722.11
8.1.150.0050.00318.97
8.1.140.0030.00617.43
8.1.130.0030.00317.65
8.1.120.0030.00317.54
8.1.110.0000.00717.36
8.1.100.0040.00417.54
8.1.90.0030.00517.38
8.1.80.0070.00017.29
8.1.70.0030.00317.49
8.1.60.0030.00617.63
8.1.50.0000.00817.55
8.1.40.0000.00817.41
8.1.30.0000.00917.57
8.1.20.0000.00717.49
8.1.10.0040.00417.50
8.1.00.0050.00617.39
8.0.300.0000.00720.16
8.0.290.0040.00416.63
8.0.280.0030.00318.39
8.0.270.0030.00317.24
8.0.260.0060.00017.18
8.0.250.0070.00016.88
8.0.240.0080.00016.87
8.0.230.0070.00016.86
8.0.220.0000.00716.85
8.0.210.0060.00316.84
8.0.200.0070.00316.93
8.0.190.0040.00416.98
8.0.180.0000.00716.84
8.0.170.0050.00316.88
8.0.160.0040.00416.98
8.0.150.0000.00716.90
8.0.140.0040.00416.73
8.0.130.0000.00513.27
8.0.120.0040.00416.84
8.0.110.0030.00516.80
8.0.100.0000.00716.91
8.0.90.0050.00316.91
8.0.80.0030.01216.92
8.0.70.0050.00216.69
8.0.60.0040.00416.78
8.0.50.0000.00816.91
8.0.30.0090.00917.11
8.0.20.0150.00717.40
8.0.10.0000.00716.97
8.0.00.0080.00916.69
7.4.330.0000.00515.08
7.4.320.0060.00016.40
7.4.300.0060.00016.40
7.4.290.0070.00016.53
7.4.280.0060.00316.59
7.4.270.0000.00716.65
7.4.260.0000.00716.36
7.4.250.0070.00316.57
7.4.240.0030.00316.54
7.4.230.0030.00316.63
7.4.220.0110.00816.43
7.4.210.0160.00316.47
7.4.200.0000.00716.70
7.4.160.0070.01416.41
7.4.150.0150.00317.40
7.4.140.0130.00917.86
7.4.130.0110.01316.53
7.4.120.0120.00516.44
7.4.110.0030.01416.34
7.4.100.0120.00616.41
7.4.90.0140.00316.43
7.4.80.0100.01419.39
7.4.70.0110.00616.48
7.4.60.0130.00316.46
7.4.50.0000.00416.18
7.4.40.0090.01516.52
7.4.30.0090.01316.52
7.4.10.0150.00315.07
7.4.00.0080.00914.92
7.3.330.0030.00313.16
7.3.320.0030.00313.15
7.3.310.0030.00316.28
7.3.300.0040.00416.11
7.3.290.0040.01316.31
7.3.280.0080.00816.27
7.3.270.0060.01117.40
7.3.260.0120.00416.44
7.3.250.0070.01016.34
7.3.240.0040.01416.50
7.3.230.0080.00816.39
7.3.210.0030.01616.44
7.3.200.0080.01119.39
7.3.190.0100.00516.26
7.3.180.0080.00816.46
7.3.170.0090.01216.37
7.3.160.0070.01416.60
7.3.130.0030.01314.50
7.3.120.0040.01414.76
7.3.110.0100.01014.53
7.3.100.0120.00214.71
7.3.90.0070.00714.60
7.3.80.0080.00514.59
7.3.70.0050.00614.63
7.3.60.0030.01014.73
7.3.50.0090.00814.71
7.3.40.0090.00514.53
7.3.30.0060.00814.79
7.3.20.0080.00916.52
7.3.10.0090.00816.76
7.3.00.0040.00916.62
7.2.330.0110.00616.71
7.2.320.0100.01316.27
7.2.310.0180.00316.49
7.2.300.0070.01016.24
7.2.290.0060.01216.64
7.2.260.0040.01114.83
7.2.250.0020.01614.67
7.2.240.0070.01015.12
7.2.230.0050.01114.95
7.2.220.0070.00915.01
7.2.210.0090.00514.80
7.2.200.0090.00614.90
7.2.190.0080.00514.89
7.2.180.0080.00714.75
7.2.170.0090.00614.94
7.2.160.0070.01014.54
7.2.150.0040.00716.97
7.2.140.0090.00616.95
7.2.130.0030.01116.69
7.2.120.0050.00916.64
7.2.110.0050.00816.64
7.2.100.0050.00816.48
7.2.90.0060.00816.72
7.2.80.0090.00516.65
7.2.70.0060.00616.78
7.2.60.0030.00816.74
7.2.50.0060.00816.81
7.2.40.0100.00516.92
7.2.30.0080.00616.73
7.2.20.0050.00816.72
7.2.10.0030.01016.60
7.2.00.0050.00817.58
7.1.330.0060.00815.58
7.1.320.0040.00615.70
7.1.310.0050.00915.88
7.1.300.0060.00915.44
7.1.290.0070.00915.85
7.1.280.0060.00615.67
7.1.270.0050.01115.60
7.1.260.0070.00715.65
7.1.250.0000.01515.91
7.1.240.0060.00715.62
7.1.230.0020.01215.68
7.1.220.0070.00815.71
7.1.210.0030.00815.73
7.1.200.0060.00715.58
7.1.190.0060.00615.50
7.1.180.0080.00815.75
7.1.170.0080.00515.64
7.1.160.0050.00915.71
7.1.150.0100.00315.86
7.1.140.0040.00915.80
7.1.130.0040.00615.74
7.1.120.0090.00415.55
7.1.110.0090.00315.74
7.1.100.0050.00716.58
7.1.90.0030.01015.68
7.1.80.0050.00715.61
7.1.70.0040.01016.23
7.1.60.0070.01016.97
7.1.50.0050.01116.13
7.1.40.0070.00215.71
7.1.30.0130.00215.66
7.1.20.0080.00515.53
7.1.10.0080.00315.44
7.1.00.0060.02817.91
7.0.330.0030.01015.15
7.0.320.0050.01015.28
7.0.310.0030.00715.34
7.0.300.0080.00615.26
7.0.290.0060.00815.17
7.0.280.0050.00715.34
7.0.270.0050.00615.13
7.0.260.0030.00915.15
7.0.250.0050.00615.20
7.0.240.0060.00515.31
7.0.230.0030.01015.30
7.0.220.0010.01215.38
7.0.210.0050.00615.19
7.0.200.0040.00515.53
7.0.190.0050.00315.31
7.0.180.0080.00615.37
7.0.170.0040.00615.33
7.0.160.0070.00515.35
7.0.150.0070.00515.19
7.0.140.0040.01015.38
7.0.130.0040.00915.28
7.0.120.0080.00315.26
7.0.110.0080.00515.22
7.0.100.0050.00615.11
7.0.90.0030.01015.25
7.0.80.0040.01015.01
7.0.70.0070.00515.19
7.0.60.0040.02816.79
7.0.50.0070.03016.18
7.0.40.0050.01715.57
7.0.30.0090.02215.52
7.0.20.0100.02015.44
7.0.10.0060.03215.69
7.0.00.0080.01715.64
5.6.400.0070.00314.47
5.6.390.0040.00714.41
5.6.380.0050.00814.38
5.6.370.0020.00714.15
5.6.360.0060.00614.25
5.6.350.0050.00914.37
5.6.340.0030.00814.13
5.6.330.0080.00614.53
5.6.320.0080.00814.19
5.6.310.0030.00813.93
5.6.300.0030.00814.46
5.6.290.0060.00514.21
5.6.280.0040.02816.63
5.6.270.0060.00714.39
5.6.260.0050.00613.98
5.6.250.0040.00814.24
5.6.240.0070.00714.15
5.6.230.0070.00514.33
5.6.220.0050.00714.41
5.6.210.0050.02416.33
5.6.200.0100.03115.55
5.6.190.0060.02816.36
5.6.180.0080.02316.25
5.6.170.0140.02116.43
5.6.160.0080.03216.27
5.6.150.0100.02315.47
5.6.140.0100.01915.63
5.6.130.0070.03115.52
5.6.120.0090.03016.63
5.6.110.0060.02116.58
5.6.100.0060.02216.45
5.6.90.0070.03516.51
5.6.80.0050.02216.36
5.6.70.1530.02016.11
5.6.60.0060.01114.15
5.6.50.0050.00814.00
5.6.40.0050.00714.16
5.6.30.0110.00314.36
5.6.20.0100.00614.21
5.6.10.0080.00614.02
5.6.00.0030.01114.03
5.5.380.0050.00612.66
5.5.370.0070.00512.47
5.5.360.0080.00112.64
5.5.350.0100.02715.21
5.5.340.0080.02214.46
5.5.330.0060.02115.11
5.5.320.0100.01715.21
5.5.310.0140.01615.04
5.5.300.0030.03114.29
5.5.290.0050.02814.55
5.5.280.0080.03015.25
5.5.270.0050.01815.42
5.5.260.0060.03215.27
5.5.250.0060.02115.20
5.5.240.0020.03215.10
5.5.230.0070.00712.50
5.5.220.0060.00412.53
5.5.210.0050.00612.44
5.5.200.0090.00512.57
5.5.190.0050.00812.45
5.5.180.0050.00512.61
5.5.170.0050.00814.16
5.5.160.0050.00612.46
5.5.150.0070.00412.40
5.5.140.0090.00112.53
5.5.130.0030.00712.47
5.5.120.0070.00612.40
5.5.110.0050.00412.56
5.5.100.0050.00512.37
5.5.90.0030.00912.53
5.5.80.0050.00712.20
5.5.70.0030.00912.18
5.5.60.0060.00412.37
5.5.50.0070.00712.58
5.5.40.0030.00812.31
5.5.30.0040.00612.54
5.5.20.0060.00612.49
5.5.10.0060.00612.43
5.5.00.0020.00612.58
5.4.450.0280.02113.84
5.4.440.0150.02513.77
5.4.430.0110.02313.81
5.4.420.0130.01913.86
5.4.410.0090.02613.80
5.4.400.0130.02213.74
5.4.390.0100.02713.63
5.4.380.0130.02113.61
5.4.370.0110.02513.51
5.4.360.0120.03113.68
5.4.350.0130.02413.66
5.4.340.0110.02413.77
5.4.330.0030.00510.98
5.4.320.0140.02113.64
5.4.310.0130.02413.68
5.4.300.0160.01813.73
5.4.290.0150.02013.67
5.4.280.0160.02913.61
5.4.270.0190.02413.63
5.4.260.0100.02213.62
5.4.250.0140.02013.73
5.4.240.0110.02913.70
5.4.230.0140.02313.51
5.4.220.0090.02613.67
5.4.210.0120.02413.57
5.4.200.0130.01912.98
5.4.190.0110.02113.59
5.4.180.0090.02213.60
5.4.170.0130.01913.57
5.4.160.0120.01913.55
5.4.150.0090.02313.76
5.4.140.0140.01912.87
5.4.130.0100.02212.82
5.4.120.0140.02112.80
5.4.110.0050.02512.80
5.4.100.0090.02212.84
5.4.90.0100.01812.73
5.4.80.0090.02012.85
5.4.70.0170.02212.75
5.4.60.0070.02212.72
5.4.50.0090.02112.82
5.4.40.0060.02312.64
5.4.30.0130.01612.86
5.4.20.0070.02212.78
5.4.10.0070.02212.78
5.4.00.0100.01912.58
5.3.290.0150.02712.77
5.3.280.0080.03212.55
5.3.270.0190.02512.69
5.3.260.0120.03012.55
5.3.250.0120.02712.42
5.3.240.0120.02812.54
5.3.230.0210.02012.60
5.3.220.0120.02812.47
5.3.210.0180.02412.46
5.3.200.0080.04112.46
5.3.190.0110.03112.48
5.3.180.0150.02512.57
5.3.170.0120.03112.49
5.3.160.0130.02712.51
5.3.150.0120.02612.56
5.3.140.0160.02512.40
5.3.130.0160.02612.48
5.3.120.0130.02812.57
5.3.110.0120.03012.58
5.3.100.0120.02812.22
5.3.90.0100.02612.28
5.3.80.0080.03212.11
5.3.70.0100.02812.18
5.3.60.0050.03012.23
5.3.50.0080.02712.07
5.3.40.0080.02512.18
5.3.30.0070.02812.02
5.3.20.0160.02511.99
5.3.10.0080.03311.87
5.3.00.0110.03011.89
5.2.170.0030.03010.17
5.2.160.0110.02110.18
5.2.150.0130.02010.23
5.2.140.0060.02810.13
5.2.130.0070.02210.26
5.2.120.0030.02810.06
5.2.110.0140.01810.12
5.2.100.0110.02110.18
5.2.90.0100.02210.07
5.2.80.0080.02310.07
5.2.70.0100.02310.08
5.2.60.0100.02010.13
5.2.50.0150.0189.98
5.2.40.0110.0189.94
5.2.30.0100.02310.15
5.2.20.0050.0279.96
5.2.10.0100.0209.88
5.2.00.0120.0199.72
5.1.60.0110.0169.21
5.1.50.0080.0189.16
5.1.40.0120.0239.19
5.1.30.0160.0179.35
5.1.20.0100.0209.35
5.1.10.0080.0209.18
5.1.00.0130.0249.19
5.0.50.0110.0158.42
5.0.40.0080.0188.39
5.0.30.0050.0288.31
5.0.20.0030.0218.24
5.0.10.0000.0278.31
5.0.00.0070.0268.30
4.4.90.0070.0127.11
4.4.80.0030.0147.09
4.4.70.0070.0117.07
4.4.60.0040.0127.13
4.4.50.0050.0107.11
4.4.40.0030.0197.11
4.4.30.0040.0127.07
4.4.20.0030.0157.12
4.4.10.0050.0127.14
4.4.00.0030.0207.14
4.3.110.0050.0157.07
4.3.100.0020.0157.04
4.3.90.0070.0117.05
4.3.80.0030.0197.07
4.3.70.0020.0137.08
4.3.60.0020.0157.06
4.3.50.0020.0157.06
4.3.40.0030.0207.04
4.3.30.0050.0126.44
4.3.20.0020.0146.44
4.3.10.0030.0146.43
4.3.00.0080.0137.79

preferences:
36.96 ms | 401 KiB | 5 Q