3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getNewLetter(string $letter, int $number): string { $newOrd = (ord($letter) + $number - 65) % 26; if ($newOrd < 0) { $newOrd += 26; } return chr(65 + $newOrd); } echo getNewLetter("H", 4); echo getNewLetter("H", 26); echo getNewLetter("H", -32);

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.4.120.0110.01017.95
8.4.110.0140.00719.49
8.4.100.0110.00517.83
8.4.90.0050.00320.59
8.4.80.0080.00619.05
8.4.70.0050.00418.92
8.4.60.0100.00918.79
8.4.50.0110.01018.71
8.4.40.0080.00017.93
8.4.30.0090.00020.59
8.4.20.0160.00319.43
8.4.10.0090.00619.24
8.3.250.0140.00616.77
8.3.240.0130.00716.61
8.3.230.0130.00616.80
8.3.220.0150.00318.54
8.3.210.0100.00518.63
8.3.200.0070.00216.51
8.3.190.0120.00717.18
8.3.180.0100.00918.73
8.3.170.0060.00319.16
8.3.160.0090.00917.25
8.3.150.0090.00919.01
8.3.140.0070.01116.46
8.3.130.0060.00316.75
8.3.120.0060.00318.99
8.3.110.0060.00318.56
8.3.100.0070.00416.72
8.3.90.0110.00726.77
8.3.80.0000.01216.75
8.3.70.0140.00416.63
8.3.60.0130.00618.56
8.3.50.0100.00724.46
8.3.40.0070.00722.03
8.3.30.0090.00918.76
8.3.20.0070.00024.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0150.00516.72
8.2.280.0040.00420.18
8.2.270.0110.00717.46
8.2.260.0040.00420.70
8.2.250.0000.00816.89
8.2.240.0040.00417.28
8.2.230.0080.00020.94
8.2.220.0030.00537.54
8.2.210.0100.00726.77
8.2.200.0110.00016.38
8.2.190.0070.00716.58
8.2.180.0060.00925.92
8.2.170.0070.00719.09
8.2.160.0110.00322.96
8.2.150.0000.00725.66
8.2.140.0050.00324.66
8.2.130.0080.00026.16
8.2.120.0000.00826.35
8.2.110.0040.00421.82
8.2.100.0060.00617.91
8.2.90.0050.00318.03
8.2.80.0040.00418.16
8.2.70.0040.00418.05
8.2.60.0000.00818.34
8.2.50.0030.00518.10
8.2.40.0040.00419.42
8.2.30.0000.00719.42
8.2.20.0070.00018.16
8.2.10.0030.00619.41
8.2.00.0000.00719.31
8.1.330.0070.01216.25
8.1.320.0120.00717.82
8.1.310.0090.01218.43
8.1.300.0060.00317.82
8.1.290.0040.00730.84
8.1.280.0170.00325.92
8.1.270.0000.00823.99
8.1.260.0040.00428.09
8.1.250.0030.00528.09
8.1.240.0060.00320.84
8.1.230.0040.00722.63
8.1.220.0070.00017.74
8.1.210.0080.00018.77
8.1.200.0060.00317.22
8.1.190.0000.00817.10
8.1.180.0030.00518.10
8.1.170.0050.00318.55
8.1.160.0000.00719.01
8.1.150.0050.00318.82
8.1.140.0000.00718.75
8.1.130.0000.00817.38
8.1.120.0060.00317.42
8.1.110.0040.00417.35
8.1.100.0000.00717.37
8.1.90.0000.00717.40
8.1.80.0030.00617.33
8.1.70.0070.00017.40
8.1.60.0030.00517.58
8.1.50.0090.00017.44
8.1.40.0040.00417.50
8.1.30.0040.00417.64
8.1.20.0040.00417.58
8.1.10.0060.00317.56
8.1.00.0040.00417.39
8.0.300.0040.00419.65
8.0.290.0040.00416.63
8.0.280.0030.00318.36
8.0.270.0050.00316.86
8.0.260.0000.00716.88
8.0.250.0040.00416.95
8.0.240.0030.00316.87
8.0.230.0040.00416.94
8.0.220.0080.00016.79
8.0.210.0080.00016.95
8.0.200.0000.00716.95
8.0.190.0030.00316.96
8.0.180.0000.00716.89
8.0.170.0000.00816.96
8.0.160.0080.00016.81
8.0.150.0000.00716.78
8.0.140.0000.00716.77
8.0.130.0000.00613.41
8.0.120.0000.01016.82
8.0.110.0000.00716.71
8.0.100.0040.00416.77
8.0.90.0070.00016.69
8.0.80.0050.01016.86
8.0.70.0040.00416.71
8.0.60.0050.00316.91
8.0.50.0000.00916.85
8.0.30.0070.01016.97
8.0.20.0110.00816.82
8.0.10.0000.00717.05
8.0.00.0100.01016.78
7.4.330.0020.00215.55
7.4.320.0040.00416.40
7.4.300.0060.00016.50
7.4.290.0020.00516.51
7.4.280.0080.00016.40
7.4.270.0000.00716.52
7.4.260.0000.00513.27
7.4.250.0060.00316.60
7.4.240.0040.00416.50
7.4.230.0000.00816.57
7.4.220.0060.00216.45
7.4.210.0060.00716.57
7.4.200.0000.00716.40
7.4.130.0120.00816.47
7.4.120.0300.00016.66
7.4.110.0270.00316.57
7.4.100.0160.01316.48
7.4.90.0070.01016.52
7.4.80.0260.00816.42
7.4.70.0170.01316.42
7.4.60.0210.01016.37
7.4.50.0190.01116.39
7.4.40.0190.01116.32
7.4.30.0240.00616.73
7.4.20.0170.01816.60
7.4.10.0270.00316.55
7.4.00.0120.00616.36
7.3.330.0030.00416.33
7.3.320.0030.00313.30
7.3.310.0000.00716.16
7.3.300.0040.00416.31
7.3.290.0050.01316.33
7.3.260.0130.00416.41
7.3.240.0040.01316.39
7.3.230.0220.01316.48
7.3.220.0000.01816.42
7.3.210.0040.01816.27
7.3.200.0230.00916.61
7.3.190.0260.00916.30
7.3.180.0180.01416.63
7.3.170.0260.00516.43
7.3.160.0360.00316.53
7.3.150.0190.01716.66
7.3.140.0200.01116.40
7.3.130.0210.01716.29
7.3.120.0260.00816.52
7.3.110.0270.00816.48
7.3.100.0200.00916.48
7.3.90.0310.00716.39
7.3.80.0190.01216.35
7.3.70.0170.01416.44
7.3.60.0110.00616.48
7.3.50.0030.01316.33
7.3.40.0110.00516.37
7.3.30.0210.00716.46
7.3.20.0190.00816.38
7.3.10.0160.01316.37
7.3.00.0190.01016.39
7.2.340.0260.00916.77
7.2.330.0150.00316.63
7.2.320.0180.01116.63
7.2.310.0190.01116.74
7.2.300.0240.00716.68
7.2.290.0260.01116.74
7.2.280.0220.01216.39
7.2.270.0220.01316.21
7.2.260.0140.01616.43
7.2.250.0210.01816.61
7.2.240.0230.01116.71
7.2.230.0140.02116.66
7.2.220.0230.01316.44
7.2.210.0310.00316.34
7.2.200.0220.01216.52
7.2.190.0100.00816.61
7.2.180.0130.00816.53
7.2.170.0210.00716.58
7.2.160.0210.00916.55
7.2.150.0260.00316.68
7.2.140.0160.01316.78
7.2.130.0270.00416.60
7.2.120.0280.00316.65
7.2.110.0210.01116.66
7.2.100.0270.00316.76
7.2.90.0200.01416.50
7.2.80.0260.01116.41
7.2.70.0340.00416.39
7.2.60.0220.00716.55
7.2.50.0280.00316.62
7.2.40.0230.00916.52
7.2.30.0180.01116.74
7.2.20.0430.00316.51
7.2.10.0270.00416.58
7.2.00.0210.01116.68

preferences:
29.42 ms | 403 KiB | 5 Q